VSCode: How to Split Editor Vertically

2019-01-21 00:26发布

In Visual Studio code, a while ago, when I used View->Split Editor, it would split vertically. (One file on the left and one file on the right.)

I updated Visual Studio Code and when when I do View->Split Editor, it always splits horizontally. (One file on the top and one file on the bottom.)

How can I split vertically?

7条回答
淡お忘
2楼-- · 2019-01-21 00:29

Press CMD + SHIFT + P (MAC) and search for Toggle Editor Group

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2019-01-21 00:40

In 1.20

ALT+SHIFT+0 PC (Windows, Linux)

++0 Mac

Pre-1.20

ALT+SHIFT+1 PC (Windows, Linux)

++1 Mac

Changes editor split layout from horizontal to vertical

In 1.25 you can split editor into Grid layout. Check View=>Editor Layout

It is nicely presented in Release notes v1.25: VS Code grid editor layout

查看更多
The star\"
4楼-- · 2019-01-21 00:40

To change the editor in Landscape and Vertical mode, follow the steps below.

  1. For example, open two files that you have in your left or right side bar, depending on where you are placed. By default it is always on the left.

  2. Now that you have both windows open, you have to use the key combination for PC (Alt + Shift + 1) for (Windows and Linux Operating Systems) or for MAC (Cmd + Option + 1), as commented here v-andrew.

查看更多
一夜七次
5楼-- · 2019-01-21 00:47

If you're looking for a way to change this through the GUI, at least in the current version 1.10.1 if you hover over the OPEN EDITORS group in the EXPLORER pane a button appears that toggles the editor group layout between horizontal and vertical.

Visual Studio Code - toggle editor group layout button

查看更多
Rolldiameter
6楼-- · 2019-01-21 00:47

I just found a simple solution. You can drag an opened file and move towards the four sides of the Editor, it will show a highlighted area that you can drop to. It will split the view automatically, either horizontally, vertically, or even into three rows.

VSCode v1.30.2

查看更多
forever°为你锁心
7楼-- · 2019-01-21 00:49

The key bindings has been changed with version 1.20:

SHIFT+ALT+0 for Linux.

Presumably the same works for Windows also and CMD+OPT+0 for Mac.

查看更多
登录 后发表回答