Skip to content
Tutorials Center
My learning

Topics

Lesson 6 of 40 ยท Interface and Settings

The Workbench Layout

Tour the VS Code window: Activity Bar, Side Bar, editor groups, Panel, Status Bar and Zen Mode, with the shortcuts to show, hide and resize each part.

The VS Code window is called the workbench. It has a small set of named parts, and once you know their names the documentation, settings and shortcuts make sense. This lesson tours each part, shows how to show, hide and rearrange it, and ends with a few layout recipes for different tasks.

The parts of the window

flowchart LR
  subgraph W[Workbench]
    direction LR
    AB[Activity Bar] --- SB[Side Bar] --- ED[Editor area] --- SEC[Secondary Side Bar]
  end
  PN[Panel<br/>Terminal, Problems, Output] -.-> W
  ST[Status Bar] -.-> W

The Activity Bar, Side Bar, Editor area and Panel share the window; the Status Bar runs along the bottom.

Activity Bar

The narrow strip of icons at the far left (or top, if you move it). Each icon opens a view in the Side Bar:

Icon View Shortcut
Files Explorer Ctrl+Shift+E
Magnifier Search Ctrl+Shift+F
Branch Source Control Ctrl+Shift+G
Triangle with bug Run and Debug Ctrl+Shift+D
Squares Extensions Ctrl+Shift+X

Extensions add their own icons (Docker, Testing, a remote explorer). Right-click the bar to hide icons you never use, or drag an icon to reorder it. Accounts and Manage (the gear) sit at the bottom.

The panel next to the Activity Bar showing the current view. Toggle it with Ctrl+B. When you want maximum room for code, hide it and use Quick Open (Ctrl+P) to jump between files.

Editor area

The center, where files open as tabs. It can be split into several editor groups:

  • Ctrl+\ splits the active editor to the right.
  • Ctrl+1, Ctrl+2, Ctrl+3 focuses the first, second, third group.
  • Drag a tab to the edge of the editor area to create a split.
  • Ctrl+K Ctrl+Left / Right moves focus between groups; Ctrl+K Left / Right moves the editor to the neighbor group.

A tab shown in italics is a preview tab: single-clicking a file in the Explorer opens it in a tab that the next single click will replace. Double-click the file or the tab (or just edit it) to keep it open permanently. You can turn the behavior off with workbench.editor.enablePreview.

Tab shortcuts you will use constantly:

  • Ctrl+Tab cycles through recently used editors; Ctrl+PageUp / PageDown moves in tab order.
  • Ctrl+W closes the current tab; Ctrl+K W closes all in the group; Ctrl+Shift+T reopens the last closed one.
  • Right-click a tab for Pin, which keeps it left and safe from close-all commands.

Panel

The area at the bottom with tabs for Terminal, Problems, Output, Debug Console and Ports. Toggle with Ctrl+J. The terminal alone opens with Ctrl+` (backtick). Ctrl+Shift+M shows Problems, which lists the errors and warnings found in your files. Drag the panel's top edge to resize it, or use the maximize arrow to give it the whole editor area. The panel can also sit to the right or left through its context menu.

Secondary Side Bar

A second side bar on the right, toggled with Ctrl+Alt+B. Many people drag the Outline or a chat view there so the left bar can stay on Explorer. Drag any view title across the window to move it.

Status Bar

The colored bar along the bottom shows the Git branch (left), error and warning counts, the cursor position (Ln 12, Col 5), the indentation (Spaces: 2), the file encoding, the line ending (LF or CRLF) and the language mode (JavaScript). Each item is clickable: click Spaces: 2 to change indentation, the language to change mode, the encoding to reopen a file with a different one. The bar turns orange when you open a window without a folder, and a different color while debugging.

Above the editor, breadcrumbs show the path to the current file and the symbol the cursor is in; click a segment to browse siblings. The minimap on the right edge is a shrunken view of the file; you can hide it with "editor.minimap.enabled": false if it distracts you.

Zen Mode, full screen and centered layout

  • Zen Mode (Ctrl+K Z) hides everything except the editor. Press Esc twice to leave it.
  • Full Screen: F11 on Windows and Linux.
  • Centered Layout (View > Appearance > Centered Layout) places a narrower editor in the middle, which reads comfortably on wide monitors.

Layout recipes

  1. Writing code: Side Bar hidden (Ctrl+B), Panel hidden (Ctrl+J), tabs near zero. Use Ctrl+P to navigate.
  2. Debugging: Run and Debug view on the left, Debug Console in the Panel, editor on the right.
  3. Comparing: split with Ctrl+\, or use code --diff a b.
  4. Reviewing a Git change: Source Control view open, click a file to see a side-by-side diff.
  5. Teaching or screen sharing: Zen Mode and a larger zoom with Ctrl+= and Ctrl+-.

A stand-in: toggling parts

This JavaScript model keeps track of which workbench parts are visible and mirrors the toggle shortcuts. It is a teaching model of the layout state, not VS Code's code.

JS Stand-in: workbench toggles

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Reset the layout

If the window becomes strange, View: Reset View Locations puts views back where they started, and the Layout menu (View > Appearance) can show or hide each part. The icon group at the top right of the window (Layout controls) offers the same toggles with one click.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. Which shortcut toggles the Side Bar?

    Ctrl+B toggles the Side Bar; Ctrl+J toggles the Panel.
  2. 2. What is an italic tab title?

    Single-clicking in the Explorer opens a preview tab, shown in italics, until you edit or double-click it.
  3. 3. Where would you find the list of errors and warnings?

    The Problems tab in the Panel (Ctrl+Shift+M) lists errors and warnings.
  4. 4. How do you leave Zen Mode?

    Pressing Esc twice exits Zen Mode; Ctrl+K Z toggles it too.

Summary

  • The workbench has an Activity Bar, Side Bar, Editor area, Panel, optional Secondary Side Bar and a Status Bar.
  • Ctrl+B and Ctrl+J toggle the Side Bar and Panel; Ctrl+` opens the terminal.
  • The editor area splits into groups; preview tabs appear in italics.
  • Status Bar items are clickable shortcuts for indentation, encoding, line endings and language.
  • Zen Mode, centered layout and layout recipes help with focus.

Next: Settings: UI and JSON