Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support fixed width terminal windows #74501

Closed
tlemo opened this issue May 28, 2019 · 34 comments · Fixed by #133541
Closed

Support fixed width terminal windows #74501

tlemo opened this issue May 28, 2019 · 34 comments · Fixed by #133541
Assignees
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes on-testplan terminal General terminal issues that don't fall under another label upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@tlemo
Copy link

tlemo commented May 28, 2019

Issue Type: Feature Request

For the integrated terminal, please add an option to set a fixed logical width, and a horizontal scroll bar when the terminal window is smaller than the logical width. Related to #46192 (but specific to the integrated terminal).

Seems also likely that this is what #48897 was asking for.

Thanks.

VS Code version: Code 1.34.0 (a622c65, 2019-05-15T21:59:37.030Z)
OS version: Windows_NT x64 10.0.16299

@vscodebot vscodebot bot added the terminal General terminal issues that don't fall under another label label May 28, 2019
@Tyriar
Copy link
Member

Tyriar commented May 31, 2019

@tlemo I'm interested in your use case? Do you just use small windows and/or some program is better on wide?

@Tyriar Tyriar added the feature-request Request for new features or functionality label May 31, 2019
@Tyriar Tyriar added this to the Backlog milestone May 31, 2019
@tlemo
Copy link
Author

tlemo commented May 31, 2019 via email

@Tyriar
Copy link
Member

Tyriar commented Oct 9, 2019

Related: #79246

@jagdishrajan
Copy link

@tlemo I'm interested in your use case? Do you just use small windows and/or some program is better on wide?

@Tyriar, I create PS functions that output other context specific PS commands that are quite long (because of blob paths, connection strings etc.) These then need to be copied and pasted in a single line, so having the original output wrap disrupts this methodology.

@Tyriar
Copy link
Member

Tyriar commented Dec 27, 2019

@jagdishrajan you're meant to be able to be easily copy wrapped lines by double clicking them, is PS's table formatting preventing that or something? (if so you could try column selection with alt+drag)

@ultraGentle
Copy link
Contributor

Integrated terminal with (1) no line wrapping + (2) horizontal scroll would also be useful to me.

Use case
I'm using the Google Firebase local emulator, and logs are output to the terminal.

Logs may include long strings: urls, ids, tokens, etc. -- also, nested JSON.

I don't need to see all their contents; I just need to be able to see back up the history of logs.

With line wrap, the visual structure is disrupted and it's hard to see what's going on.

I'm on a small laptop, and I have the terminal as a column at the right.

Current workaround
tput rmam command truncates long lines -- but then you can't see what's to the right, if you need it.

@tony-bony
Copy link

tony-bony commented Feb 13, 2020

I often print in the Terminal the contents of a pandas DataFrame. Wrapping the output makes the dataframe totally unreadable. And using tput rmam is out of options for me. I need to see all the data. What we need is a setting do disable wrapping and a horizontal scroll.

@jagdishrajan
Copy link

@Tyriar, terminal output can be used for many purposes such as reviewing results, copying portions of results or "other commands as results" and re-pasting them. As @tony-bony said columnar output that's aligned is difficult to review when wrapped.

It's also important to select and copy multiple lines and vertical selection of results. When selecting these results switching to the mouse rather continuing to use the keyboard is inconvenient. (Vscode editor has works well with its Ctrl+Alt+Shift+arrow shortcut for this).

@codeRSH
Copy link

codeRSH commented Mar 13, 2020

My requirement is also similar to what @tony-bony has suggested above.

VScode should allow to at least use the full width of the screen when Terminal docked at the bottom. It's not happening right now.

Any workaround or timeline for this fix of terminal width?

@wmertens
Copy link

wmertens commented Jun 8, 2020

This would also be great for vs live sessions, most of the time the shared terminal ends up being 40x10 or something terrible like that.

@Sampath-Lokuge
Copy link

Yes, this is super annoying to brake the line even though it has a huge space to go. I have a 22-inch monitor and you can see that how many spaces on the right-hand side. I don't know why you cannot give to adjust this width to the user?

vs

@CTownsdin
Copy link

I would like to see a button which toggles wrap on/off entirely.

When one is scrolling and skimming the terminal output, no wrap is nicer.

When one needs to see the output of a particular line, wrap becomes necessary.

A button or even just a keyboard shortcut to toggle line wraps in the integrated terminal on/off would be a nice feature.

@cstmgl
Copy link

cstmgl commented Sep 25, 2020

Yes, this is super annoying to brake the line even though it has a huge space to go. I have a 22-inch monitor and you can see that how many spaces on the right-hand side. I don't know why you cannot give to adjust this width to the user?

vs

just out of curiosity how do you get that? for me it does not go in the next line it goes back to the beginning and starts overwriting what I have there, incredibly annoying.
it just seems that you managed to make it wrap into a new line but mine just wraps on top

image

I really would like to not have any wrap at all.

@Tyriar
Copy link
Member

Tyriar commented Sep 25, 2020

@cstmgl see #106668

@ahmedhassan-eng
Copy link

+1: I'm outputting from PC Lint Plus and using the tasks' problem catcher with regex. This all breaks down when I get new lines inserted anywhere for no obvious reasons (other than it wraps based on terminal width pixel count).

@jwarkentin
Copy link

I'm trying to compare output lines for mistakes that could cause a problem and it's difficult when lines suddenly wrap at an arbitrary point in the middle of a word. Also, some lines I'm dealing with are rather long and quickly make the task impossible when a single line wraps enough times to consume my entire visible terminal space vertically. Additionally, with line wrapping it's not always clear when I'm dealing with a new line of output versus the continuation of a wrapped line, depending on the length of the lines and how they begin and end.

I can bail to an external terminal for now but that creates a lot of back-and-forth context switching that interrupts my flow.

@testforstephen
Copy link

This could benefit the debugger feature "Run in Terminal" too.

See the issue #100522, multiple extensions (such as JS, Dart, Java) are complaining that the startup command is very verbose, occupies multiple lines in the terminal and pollutes the program output.
Screenshot 2020-07-09 at 13 30 06

image

If it only renders the startup command in one line, that will mitigate the pain point. So allow disabling line wrapping in integrated terminal could make the terminal more clean.

@Tyriar
Copy link
Member

Tyriar commented Jan 28, 2021

@testforstephen but it would need to be switched to wrapped after anyway which would wrap the line, otherwise the whole terminal would act differently to other terminals.

@testforstephen
Copy link

but it would need to be switched to wrapped after anyway which would wrap the line, otherwise the whole terminal would act differently to other terminals.

Is it possible to turn off wrap on a certain line and still have all other lines wrapped? If not, I would like to have a user setting to control the line wrap for all terminals.

@Tyriar
Copy link
Member

Tyriar commented Jan 29, 2021

@testforstephen this feature is about being able to control the dimensions of the terminal (and having a scroll bar), there definitely isn't ever going to be any mixed wrapping or line wrapping setting because that's not how terminals work.

@testforstephen
Copy link

I commented to this feature request because i saw multiple issues about "Disable line wrap in integrated terminal" were marked as duplicates with this one. Do you need us to reopen an issue about "Disable line wrap in integrated terminal" for more discussion there again?

@andrewmcdonald-oxb
Copy link

I'm also interested in this. We use GLog for output which emits quite a lot of boilerplate at the start of each entry (timestamp, thread ID, source file & line number). The source file in particular has a variable length, which makes the payload text in each output entry inconsistently indented. To help me parse quickly, I'd really like one line per output entry, with no wrapping. Being able to set a massive fixed output width and use a scrollbar would help enormously.

@thatkookooguy
Copy link

thatkookooguy commented Apr 26, 2021

I have the same issue when viewing test outputs when running jest with coverage.
I don't want to see the coverage table wrapping up and looking all broken.

With wrapping:

without wrapping:

@Metadorius
Copy link

Metadorius commented Jun 14, 2021

Just got hit by a similiar issue. Newlines just break problem matching, producing (sometimes funny) error messages.
image
image

@kMutagene
Copy link

This becomes an issue when looking at structured print output for data frames. it is important to be able to take a look at structured data while analyzing/transforming/visualizing it.

Here is a wide data frame print in F# via Deedle in comparison to a terminal that implements a horizontal scrollbar:

  • VSCode:
    image

  • Visual Studio:
    image

removing wrap / setting a very large fixed with with a horizontal scrollbar would come a long way for data analysis in VSCode for me.

@jwarkentin
Copy link

A horizontal scrollbar would be awesome but even without that, if it's too technically complex for some reason, just having the option to have the terminal cut off lines rather than wrap them would go a very long way.

@ADTC
Copy link

ADTC commented Aug 5, 2021

I see that the Debug Console has an option to disable wrapping. Why not the Output and Terminal too?

Edit: It seems for the Output tab, I can add this to settings.json. But there's no similar setting for the Terminal tab.

    "[Log]": {
        "editor.wordWrap": "off"
    }

@Tyriar
Copy link
Member

Tyriar commented Sep 9, 2021

Upstream issue: xtermjs/xterm.js#3464

@Tyriar Tyriar added upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream labels Sep 9, 2021
Tyriar added a commit that referenced this issue Sep 21, 2021
This makes the terminal element ancestors have the correct dimensions which should
make it easier to use the scrollable element object

Part of #74501
@andrewmcdonald-oxb
Copy link

Great, looking forward to seeing it in action!

@meganrogge meganrogge added the on-release-notes Issue/pull request mentioned in release notes label Oct 1, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality insiders-released Patch has been released in VS Code Insiders on-release-notes Issue/pull request mentioned in release notes on-testplan terminal General terminal issues that don't fall under another label upstream Issue identified as 'upstream' component related (exists outside of VS Code) upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet