Join us for VS Code Live: Agent Mode Day on April 16th!
Dismiss this update
Visual Studio Code comes with a simple user interface and convenient default layout. At the same time, VS Code provides options and settings to let you customize the UI layout to suit your preferences and work style. In this topic, we'll highlight various UI customizations so you can display views, editors, and panels in the way that's most productive for you.
This article starts by discussing Workbench customizations to rearrange UI elements such as the side bars, views, and panels. Later in the article, we'll cover customization of the Editor region with editor groups, split editors, and editor tabs.
If you are new to VS Code, you may want to start with the user interface overview or take a look at the Tips and Tricks article.
By default, the Primary Side Bar is located on the left of the workbench and shows views such as the Explorer, Search, and Source Control views. You can quickly switch between views by selecting the icons in the Activity Bar.
To change the position of the Primary Side Bar, you can:
right
in the Settings editorBy default, VS Code shows views in the Primary Side Bar located to the left of the editor region. It can be useful to see two views open at the same time. To do this, you can use the Secondary Side Bar to show views opposite the Primary Side Bar. The Secondary Side Bar is always positioned opposite the Primary Side Bar, regardless if you switched the position of the Primary Side Bar.
The following image shows the Explorer view in the Primary Side Bar and the Copilot Chat view in the Secondary Side Bar:
To show the Secondary Side Bar, you can use the layout controls in the VS Code title bar. If the layout controls are not visible, right-click the VS Code title bar and select Layout Controls.
Alternatively, you can also open the Secondary Side Bar as follows:
At any time, you can drag and drop views and panels into the Primary or Secondary Side Bar. VS Code will remember the layout of views and panels across your sessions.
You can reset views and panels back to their default locations with the View: Reset View Locations command.
You can move the Command Palette to another location by grabbing the top edge with the mouse cursor and dragging it somewhere else. You can also select the Customize Layout control in the title bar, and then select one of the preconfigured Quick Input Positions.
By default, the Activity Bar moves with the Primary Side Bar and remains on the outer edge of the workbench. You can also choose to hide the Activity Bar, or move it to the top or bottom of the Primary Side Bar.
The Activity Bar Position menu is available from the Activity Bar context menu, or under View > Appearance > Activity Bar Position has the options Default, Top, Bottom, or Hidden.
When the Activity Bar is in the top or bottom position, the Account and Manage buttons, usually at the bottom of the Activity Bar, move to the right side of the title bar.
The Panel region displays UI elements such as the Problems, Terminal, and Output panels and by default is located under the editor region.
You can move the region to the left, right, bottom, or top of the editor. You can configure these options in the menu under View > Appearance > Panel Position, or via the Panel title bar context menu.
You can also use the Move Panel commands in the Command Palette:
workbench.action.positionPanelLeft
)workbench.action.positionPanelRight
)workbench.action.positionPanelBottom
)workbench.action.positionPanelTop
)This option lets you configure how far the bottom Panel spans across your window. There are four options:
With all Panel alignment options, the Activity Bar is considered the edge of the window.
You can configure these options in the menu under View > Appearance > Align Panel, Panel title context menu, or using the new Set Panel Alignment to... commands.
When the Panel alignment is Center, you can quickly toggle the Panel region to fill the entire editor area with the Maximize Panel Size chevron button in the upper right of the Panel region. The chevron button points downwards in the maximized panel to restore the panel to the original size.
You can also maximize the Panel region via the View: Toggle Maximized Panel command.
Note: Besides customizing the overall Panel region display, individual panels may have their own layout customizations. For example, the Terminal lets you have multiple open tabs and split existing terminals.
The VS Code title bar also has buttons to toggle the visibility of the main UI elements (Side bars and Panel region).
The rightmost button brings up the Customize Layout dropdown, where you can further change the visibility and layout of various UI elements and includes several layout modes:
The layout modes are:
VS Code has a default layout of views and panels in the Primary Side bar and Panel region but you can drag and drop views and panels between these regions. For example, you can drag and drop the Source Control view into the Panel region or put the Problems panel into the Primary Side bar:
Note: Remember that you can reset a view and panel back to its default location with the Reset Location context menu item or all views and panels with the general View: Reset View Locations command.
You can also add views and panels to existing view or panel to create groups. For example, you could move the Output panel to the Explorer view group by dragging over the Explorer Activity Bar item and then dropping into the view:
You are not limited to using the mouse for moving views and panels. You can also customize layouts via the keyboard with the View: Move View and View: Move Focused View commands, where dropdowns let you pick the UI element to move and the destination, either a location like the Side bar or Panel region or an existing view or panel to create a group.
Most VS Code views and panels have tool bars displayed on the top right of their UI. For example, the Search view has a tool bar with actions such as Refresh, Clear Search Results, etc.:
If you think a tool bar is too busy and you'd like to hide less frequently used actions, you can right-click on any action and select its Hide command (for example Hide 'Clear Search Results') or uncheck any of the actions from the dropdown. Hidden actions are moved to the ...
More Actions menu and can be invoked from there.
To restore an action to the tool bar, right-click the tool bar button area and select the Reset Menu command or recheck the hidden action. To restore all menus in VS Code, run View: Reset All Menus from the Command Palette (⇧⌘P (Windows, Linux Ctrl+Shift+P)).
You can customize the layout of the VS Code editor region independently of the workbench user interface. By default, the editor region displays useful features such as the minimap, breadcrumbs, editor tabs, and has optional UI such as Sticky Scroll. You can also adjust the layout of the editors themselves or move them into floating windows.
The View > Appearance menu has a section for customizing the editor region. There you'll find toggles for:
By default, each opened editor goes into the same editor group and adds a new editor tab to the right. You can create new editor groups in order to group similar or related files, or to allow side by side editing of the same file. Create a new editor group by dragging an editor to the side, or using one of the Split commands in the context menu to duplicate the current editor into a new editor group to the left, right, above, or below.
The Split editor commands are also available from the View > Editor Layout menu and through the Command Palette.
If you'd like to go quickly between vertical and horizontal editor group layout, you can use the Toggle Vertical/Horizontal Editor Layout command (⌥⌘0 (Windows, Linux Shift+Alt+0)).
You can also split an editor in the same group for side by side editing with the View: Split Editor in Group command (⌘K ⇧⌘\ (Windows, Linux Ctrl+K Ctrl+Shift+\)).
When using the split in group feature, there are specific commands for toggling this mode and navigating between the two split editors:
To navigate between the sides:
The Workbench > Editor: Split in Group Layout (workbench.editor.splitInGroupLayout) setting lets you set the preferred split editor layout to either horizontal (default) or vertical.
If you'd like more control over the editor group layout, you can use the grid layout, where you can have multiple rows and columns of editor groups visible. The View > Editor Layout menu lists various editor layout options (for example, Two Columns, Three Columns, Grid (2x2)) and you can adjust the group sizes by grabbing and moving the sash between them.
You can open an editor in a floating window, for example to move the editor to another place on your monitor or even to another monitor.
To open an editor in a floating window, drag it out of the main window and drop it anywhere outside of the current VS Code window:
Floating editor windows are capable of opening as many editors as you like in a grid layout. The windows will restore at their location after restart and reopen all the editors within.
Another way to detach an editor is to right-click on an editor tab, and select the option Move into New Window (workbench.action.moveEditorToNewWindow
) or Copy into New Window (⌘K O (Windows, Linux Ctrl+K O)).
If you want to move an entire editor group, select Move Editor Group into New Window () or Copy Editor Group into New Window ().
If you'd like an editor tab to always be visible, you can pin it to the editor tab bar. You can pin an editor tab from either the context menu or using the command View: Pin Editor (⌘K ⇧Enter (Windows, Linux Ctrl+K Shift+Enter)).
Pinned tabs help access files that are important to you as:
Unpin an editor by clicking on the pin icon, using the Unpin editor tab context menu item, or the View: Unpin Editor command.
You can choose how you'd like to display pinned editors with the Workbench > Editor: Pinned Tab Sizing (workbench.editor.pinnedTabSizing) setting. The options are:
normal
: A pinned tab inherits the look of other tabs (default)shrink
: A pinned tab shrinks to a fixed size showing parts of the editor label.compact
: A pinned tab will only show as icon or first letter of the editor label.You can also show pinned editor tabs on a separate row above the regular editor tab bar by setting Workbench > Editor: Pinned Tabs On Separate Row. You can pin and unpin editors by dragging and dropping their tabs between the two rows.
When using multiple editors, it's common to have one or more that you want to always keep visible. The locked editor group feature, where an entire editor group is locked and visible, provides a stable display and any request to open a new editor will create it in another group. You can tell whether an editor group is locked by the lock icon in the editor group tool bar.
You can lock an editor group by selecting Lock Group from the editor tool bar More Actions ...
dropdown or running the View: Lock Editor Group command.
You can unlock an editor group by clicking on the lock icon or running the View: Unlock Editor Group command.
Locked groups behave differently than unlocked groups:
The primary use case is for terminals in the editor area. For example, you might want to edit text on the left and have a terminal on the right that is always visible. When a terminal editor is created and moved to the side, it will automatically lock. This means that even when the terminal on the right is focused, opening a file will open it on the left side without needing to manually change focus first.
Auto locking groups can be configured using the workbench.editor.autoLockGroups setting, which defaults to only terminal editors but any editor type can be added to get the same behavior.
The commands related to editor group locking:
You must have more that one editor group for these commands to be available.
Read on to find out about: