Split the Editor in Visual Studio Code to Work with Multiple Files

Open files side-by-side in VS Code so you can view and edit multiple files at once. This guide shows simple ways to create splits, move files between panes, open additional layouts, and close splits.

What the video covers

Basic VS Code editing: opening files, creating editor splits, moving tabs between panes, opening additional layouts, and closing split panes.

Watch the video on YouTube

Step-by-step instructions

  1. Open files
    Launch Visual Studio Code and open the first file. Open any additional files you want to view by clicking them in the Explorer or using Open.
  2. Create a split from a tab
    Right-click the file tab and choose the Split Right (or similar) option to open that file in a new side-by-side editor pane.
  3. Use the keyboard shortcut
    Use the split-editor shortcut (Ctrl + \ on Windows/Linux or Command + \ on Mac) to quickly create a split from the active editor.
  4. Create a split by dragging
    Drag a file's tab to the left or right edge of the editor area; drop it where you want the new pane to appear to open that file in a new split.
  5. Open additional layouts
    Repeat the split actions or use the View → Editor Layout menu to select different layouts (columns or grid) for more panes.
  6. Move files between panes
    Drag a tab from one pane into another pane to move that file; you can also right-click a tab and use available move options if present.
  7. Close a split pane
    Close all files in a pane to remove that split. Alternatively, close individual tabs as needed until the pane disappears.

Watch the video

Video thumbnail for Split the Editor in Visual Studio Code to Work with Multiple Files Play tutorial

Watch on YouTube

Why it matters

Splitting the editor lets you see and edit multiple files at once, which speeds up tasks like comparing code, copying snippets, or working on related files simultaneously.

Check your result

You should see two or more editor panes with different files visible at the same time and be able to click into each pane to edit independently.

Troubleshooting

If a split doesn't appear, try a different method (right-click tab, drag the tab, or use the split shortcut). Ensure you're dragging the file's tab (not the Explorer item). If the keyboard shortcut doesn't work, try the menu-based method instead.