简体   繁体   中英

Increase the Terminal width in 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM