- Instant help with your Developer coding problems

Split editor window in VS Code

Question:
How to split editor window in VS Code?
Answer:
CTRL + \ - Splits the actual editor into two
ALT + Click - Opens the file in the Explorer in a side panel
CTRL + ENTER - Opens the file in the Quick Open in a side panel
Description:

Visual Studio Code offers a lot of options to split the screen into several parts, either vertically or horizontally. By default editors will open to the right-hand side of the active one. You can change this behavior through the setting workbench.editor.openSideBySideDirection.

Split editor using keyboard shortcut

Multiple keyboard shortcuts can be used to split the editor window vertically depending on the current context.

  • If the code editor is active then you can split into two by CTRL + \
  • If the Quick Open panel is active then CTRL + ENTER will open the selected file on the side.
  • Press F1 to open the Command Palette and type split. Select the variant you want.

Split the editor window using the mouse

There are also several ways to split the screen using the mouse.

  • Right click on the file tab. From the context menu select the Split Up or Split Down if you want to split horizontally or the Split Right or Split Left to split vertically.
  • You can also drag and drop a file to any side of the editor region.
  • Use the Split editor icon on the top right corner to split the editor window.

  • Use the menu View -> Editor Layout -> Split Right

Switch between editors

When you have more than one editor open you can switch between them quickly by holding the Ctrl + 1 , CTRL + 2 , or CTRL + 3 .

 

Share "How to split editor window in VS Code?"