Increase the Terminal width in Visual Studio Code - visual-studio-code

My R Interactive Terminal in Visual Studio Code is too short, cutting-off or wrapping the returned values too early, leading to confusion during data analysis or feature engineering. Is there any way for me to increase the width of the R Interactive Terminal?
Specifically, I am referring to the Terminal Window that is used to display processed code results from R, Python or any other interpreter:
https://webzest.com/vsc_terminal.png

you can collapse the sidebar to gain some more space. the toggle sidebar command is under View/Appearance/Show Side Bar and the keyboard shortcut is ⌘+B on macos or ⌃+B on windows. see attached screen image.
edit: thanks for sharing a screen-print, that helps to explain what you are seeing. sorry i misunderstood... i am wondering if the issue is related to the R shell you are running.
you can see in the attached screen images that the zsh shell uses all of the space available to the terminal panel.
...also, this is on macos, i have not tried windows but that could be part of it.
can you try some other shells and see if they are affected in the same way?

You can use the new setting in v1.61:
workbench.action.terminal.sizeToContentWidth
to toggle wrapping the lines. Depending on your current terminal width you may or may not get a horizontal scrollbar when you do this but at least you won't get wrapping at some pre-determined too small width. This command is also available on the terminal tab context menu: Toggle Size to Content Width.

This question and answer should help
Basically setting options("width"=200) or any value that works for you

Related

VSCode displays source code again in interactive window

A question from a newbie here: when I run some python code in VSCode, there is always a display of source code in the interactive window. Thus I have to scroll all the way down before I can see the output. That makes the debug quite troublesome.
Please see the screenshot above. The code was displayed in the interactive window despite the editor just at left side over there. Any way to have VSCode, or maybe Jupyter extension, go directly to the output? (in my case starting from the 'Training Dataset shape......')

How to remove gutter area from VS Code from both side

There seems to be some bug in VS Code, I exited ZenMode and can see gutter on both side of VS Code. This is making my coding area small and I am not able to remove it. Can someone please help me here
This happened with me earlier also, I had to reinstall VS Code, But can't do it every now and then. So need a permanent solution.
Please refer to red marked area in image below.
Note: I have tried basic troubleshooting like restarting, removing themes, removing all settings etc.
I also tried solutions mentioned below, but those are not the gutters I am referring to
How can you disable Gutter Indicators in VS Code?
How do I change the Gutter Width in VS Code?
Edit
Obviously I missunderstood your question. You want to turn off that behaviour when you are not in zen mode.
To do so press F1 and execute the command View: Toggle Centered Layout.
I found the answer in one of VS Code's issues.
To turn off the centered layout in zen mode read the original answer.
Original answer
In your settings turn off the center layout for zen mode by unchecking the setting Zen Mode: Center Layout or if you prefer the json settings set
{
"zenMode.centerLayout": false
}
Now there won't be any space between the activity bar and the first editor tab.
Screenshot:

How to set window size and position in Visual Studio Code?

Is it possible to set the VS Code window size and position, either via settings.json, though an extension, or by some other mechanism?
In Atom, I can do this in my init.coffee file as such:
atom.commands.add 'atom-workspace',
'custom:prepare-for-screencast': ->
atom.setSize(1280, 720)
atom.setPosition(37, 50)
Then I can call Prepare for screencast from the Command palette.
Not...yet?
https://code.visualstudio.com/docs/getstarted/settings
The closest I can find is window.newWindowDimensions, which only takes a few strings that refer to predefined geometries, although 'inherit' could serve you well in the meantime if you prime the pump by closing al your existing sessions, opening one window, sizing it to your liking, then quitting. Then all your new windows should be that size, and Visual Studio Code seems to be very well behaved with respect to resizing, just never close a resized window last, or it becomes your new default!
As for position, there appears to be nothing at all.
in vscode, go to
settins=>windw=>new window => new window dimension
there you are able to choose the following option to set the default dimensions, if vscode is getting opened:
inherit || offset || maximized || fullscreen
I prefer to use "inherit", i.e. open vs-code always as large as the previous one.
Start Visual Studio Code.
Click on "File"
Click on "Preferences"
Click on "Settings"
Write " window.newWindowDimensions " in the search box.
Select the value "inherit" from the drop down box.
That's it...!
If you're on a Mac, you can use this AppleScript snippet:
tell application "System Events" to tell process "Code"
tell window 1
set size to {1080, 720}
set position to {0, 0}
end tell
end tell
Not a general solution, but works well if you only need it when recording screencasts.
One way I found to solve this was by using the Developer Tools Console:
Help -> Toggle Developer Tools -> Console Tab
Type: window.resizeTo(1900, 1060);
Press Enter
Note: Tested on Windows 10, Ubuntu, OSX
Sidenote: Ubuntu had some strange behaviour bringing up the menu and developer tools. I had to open the developer tools while maximized, then undock the developer tools, then unmaximize the window, then type the command.
atom.commands.add 'atom-workspace',
'custom:prepare-for-screencast': ->
atom.setSize(1280, 720)
atom.setPosition(37, 50)
Then I can call Prepare for screencast from the Command palette.
This is really a good idea and a good feature to add to VSCode.
More important to me is "atom.setSize(1280, 720)"
Hope someone will be able to port this to VSCode.
"window.newWindowDimensions": "maximized"
Placing the following to settings.json is a good programmatical solution.
"window.newWindowDimensions": "offset",
The comment in the defaultSettings.json file says:
inherit: Open new windows with same dimension as last active one.
offset: Open new windows with same dimension as last active one with an offset position.
Basically the inherit option opens new windows completely overlapping to the current window, while the offset option opens new windows with around 50 px size of offset (depends on your screen size) from top/left.
I personally prefer "offset" but these two are essentially almost same.

vscode on mac is incorrectly highlighting text around text blocks

It is very annoying to see that background around code is lighter then the rest of the program. When the cursor moves the highlighting moves up and down to full window width. Can you please propose solution how to turn this highlighting off. Same problem is in output of task log, and in file explorer.
I have deleted all the settings and Application data and I have same problem. I have installed vscode on windows and I do not have this problem with same settings.
Unfortunately this is an issue in Chromium. You can work around this by starting VS Code with --disable-gpu from the command line.
Sean
It appears this can be fixed for some users by selecting a different color profile in macOS display settings. Note that you have to change this separately for all monitors that you use.
For me, "Apple RGB" will show these blocks, and switching to "LED Cinema Display" or "iMac" solves the issue.
See also: https://github.com/Microsoft/vscode/issues/12473#issuecomment-269024219

Gnome shell two monitors full screen apps

I'm working on the Ubuntu 16.04 whit Gnome Shell version 3.18.5 and I'm using two monitors. Issue which I have regarding aplications opend in the full screen mode.
For expample if I open on the monitor number 1 my browser and on the monitor number 2 terminal in full screen mode plus some additional application such as a code editor(not full screen). Now when I'm focus on the code editor which is on the top of the terminal it's ok but when I click on my broser window(monitor 1) then the code editor gose behind the terminal automatically.
I've prepared some video to better show this problem:
In this video you can see correct behaviour when I'm using one monitor.
Here is video showing incorrect behaviour. Don't care about the elements which are above the terminal on the left screen. Terminal was set to full screen.
Dose anybody know how to change this behaviour? I was looking for solution in google but without success. Thank you.
That's the expected behavior when things are in focus/out of focus. Try resizing your windows so they don't block one another; thus, nothing will be "behind" anything else when you shift focus by clicking here or there.