在 vscode 中可以把终端放在右边吗?

是否可以移动/打开屏幕右侧的终端窗口?这将允许我优化编辑器空间,以便更有效地工作。


在 vscode 中,当我们使用 Ctrl + I时,例如,在文件打开的位置下面打开一个终端,

38154 次浏览

As of the end of 2017, there is a button to do that: click on icon on the top right "Move to right" (if you don't see it, resize you windows).


Edit 2020: This answer is no longer correct for the new version, see @ΩmegaMan's answer (in brief: right click on the terminal bar)

View > Appearance > Toggle Panel Position, which hides the panel, does the trick for me.

It also saves the state so that next time it opens the Terminal to the right.

💡 Right Side Terminal Feature has been implemented.💡


Right click on the Terminal tab and select Move Views to Side Panel | Move Panel Right.

Current Version (Feb 2022) <Feb 2022
Latest Version Previous to Feb 2022

Another option, offered with VSCode 1.58 (June 2021):

By creating a terminal in the editor aera itself, you can put said terminal wherever you want!

Integrated Terminal

Terminals in the editor area

Terminals can now be created in or moved to the editor area, enabling a multi-dimensional grid layout that persists and remains visible regardless of panel state.

Create terminals via the Create Terminal in Editor Area command.

Move a terminal from the panel to the editor by dragging and dropping from the tabs list, running Move Terminal into Editor Area with a terminal focused, or selecting the context menu action.

4 terminals in the editor area are laid out in a 2 by 2 grid

Canvas renderer

In a prior iteration, we removed the terminal.integrated.rendererType setting in favor of terminal.integrated.gpuAcceleration when we enabled the WebGL renderer by default.

Some architectures have improved terminal performance when using the canvas renderer.

To use the canvas renderer, set terminal.integrated.gpuAcceleration to canvas.

New terminal settings

  • Set terminal.integrated.defaultLocation to editor to direct newly created terminals to the editor area.

  • Set terminal.integrated.showLinkHover to false to disable link hovers in the terminal.
    This can be useful if you find them distracting, for example.

As of v1.64:

You can click the "Layout Control" and choose Show Side Panel or the menu View/Appearance/Show Side Panel

Side Panel Terminal

and then you can drag various views into like the Terminal/Debug/Outline/SCM views.

Terminal in Side Panel demo

So you will be able to have the Panel remain on the bottom for other content and a Side Bar on the left/right and a Side Panel on the opposite side.


And with v1.64.2 you can use the command:

View: Move Panel Right or Left or Bottom

which will move the Panel to the right with the optional Side Panel to its right. The terminal can be in any one of those Panels, by dragging it for example.

Side Bar | Editors | Panel | Side Panel

See a couple more demos at https://stackoverflow.com/a/69329503/836330

Latest answer as per the November 2021.

View => Appearance => Move Side Bar Right:

enter image description here

VS Code 2022 Version 1.67.0

From the navbar: View>Appearance>Panel Position> Right

Can also toggle the position of the Panel using vanilla when clause.

VS Code docs - when clause

  {
"key": "ctrl+k ctrl+/",
"command": "workbench.action.positionPanelRight",
"when": "panelPosition == 'bottom'"
},
{
"key": "ctrl+k ctrl+/",
"command": "workbench.action.positionPanelBottom",
"when": "panelPosition == 'right'"
},

Helps to 'minimize' terminal to the bottom when needed.