How to focus in VS Code on a Mac: Zen Mode, sidebars and tiling

Set up VS Code and macOS for the task in front of you. Keep the editor, test output and whichever reference you actually need.

3 min read

A coding setup in HideTheRest Focus mode: the code editor and a docs page are clear, the chat is blacked out, and the editor has the lime selection outline.

Start with the controls already in VS Code

Choose what you need for the next half hour. If you’re tracing a bug, it might be the failing test and the file it points to. If you’re getting to know an unfamiliar project, leave Explorer open until you’ve found your bearings.

  • Command + B toggles the primary sidebar. To open a file while Explorer is hidden, use Command + P and type part of the filename.
  • Command + J toggles the panel, which usually holds the integrated terminal. Leave it up while watching a test and hide it once the output stops being relevant.
  • Use View → Appearance or search the Command Palette for Toggle Secondary Side Bar Visibility if the distracting pane is on the other side, such as a chat or outline.

When a binding differs, search for the command by name in the Command Palette. VS Code’s keyboard shortcuts · VS Code’s layout controls.

Use Zen Mode without losing your other windows

Press Command + K, then Z, to enter Zen Mode. It clears much of VS Code’s interface and can take the app full screen. Press Escape twice to leave it. To keep the editor in its current window, open Settings, search for zenMode.fullScreen, and turn it off. If you’d like more width, search for zenMode.centerLayout and adjust that too.

Zen Mode is useful for reading or writing a stretch of code. If you keep reopening the terminal or Problems panel, a smaller change to the normal layout gives you quicker access. VS Code’s Zen Mode guide.

Arrange the editor, docs and output around the task

Drag the editor to an edge to tile it on a Mac that supports desktop window tiling, or hover over the green window button and find the layout controls. Put docs or a browser preview alongside it. Resize the editor if code lines wrap too much.

For debugging, keep the command and the error trace readable. For an API integration, give the documentation enough space to show complete examples. If the distraction is notifications, enable a macOS Focus from Control Center. Let through messages you need and turn off the rest for the session. Apple’s tiling guide · Apple’s Focus settings.

Keep the parts of the workspace you need

A Mac coding setup: a dark code editor, a documentation page and a team chat, with a message notification arriving. The same setup in HideTheRest Focus mode: the editor and the docs are clear and the chat window is blacked out.
Docs you need, chat you don’t, and a ping on top.
  1. Arrange the editor, terminal and the one reference you need. Open HideTheRest and choose Focus.
  2. Draw a clear region around your editor and another around the reference. Include the terminal in the editor box if the two are close together, or give the output its own box.
  3. Choose Dim for a soft shade around the work and save it with a task name such as Debug with logs if you’ll reuse it. Click Apply to go back to coding.

Then run through your usual workflow. Open a file, start a test and scroll the docs. If the shade gets between you and a control you use repeatedly, make that control part of the clear region. If one panel is the only problem, choose Hide and shade just that panel instead.

HideTheRest for Mac · Holiday Season Sale

Get the app now
for $9.99.

Cover what distracts you in any app, site or game, on every desktop and display. Pay once and it’s yours.

  • Works in every app, with no permissions
  • Hide or Focus, with Dim, Blur or Blackout
  • Saved layouts, one click from the menu bar
  • No account, no subscription, works offline
Try the demo first

Holiday Season Sale price until Thursday, December 31 at 11:59 PM PST · One-time purchase · macOS 13 Ventura or later

The same setup in HideTheRest Focus mode: the editor and the docs are clear and the chat window is blacked out.

$9.99was $19.99one-time