Visual Studio Code Keyboard Shortcuts for Linux

Keyboard shortcuts for Visual Studio Code on Linux. Navigate the editor, manage files, and use the integrated terminal on Linux.
Key label style

General

Show Command Palette
Ctrl+Shift+P
or
F1
Quick Open, Go to File...
Ctrl+P
New window/instance
Ctrl+Shift+N
Close window/instance
Ctrl+W
User Settings
Ctrl+,
Keyboard Shortcuts
Ctrl+K,Ctrl+S

Basic editing

Cut line (empty selection)
Ctrl+X
Copy line (empty selection)
Ctrl+C
Move line down/up
Alt+Down
or
Alt+Up
Delete line
Ctrl+Shift+K
Insert line below/ above
Ctrl+Enter
or
Ctrl+Shift+Enter
Jump to matching bracket
Ctrl+Shift+\
Indent/Outdent line
Ctrl+]
or
Ctrl+[
Go to beginning/end of line
Home
or
End
Go to beginning/end of file
Ctrl+Home
or
Ctrl+End
Scroll line up/down
Ctrl+Up
or
Ctrl+Down
Scroll page up/down
Alt+Pg Up
or
Alt+Pg Dn
Fold/unfold region
Ctrl+Shift+[
or
Ctrl+Shift+]
Fold/unfold all subregions
Ctrl+K,Ctrl+[
or
Ctrl+K,Ctrl+]
Fold/Unfold all regions
Ctrl+K,Ctrl+0
or
Ctrl+K,Ctrl+J
Add line comment
Ctrl+K,Ctrl+C
Remove line comment
Ctrl+K,Ctrl+U
Toggle line comment
Ctrl+/
Toggle block comment
Ctrl+Shift+A
Toggle word wrap
Alt+Z

Rich languages editing

Trigger suggestion
Ctrl+Space
or
Ctrl+I
Trigger parameter hints
Ctrl+Shift+Space
Format document
Ctrl+Shift+I
Format selection
Ctrl+K,Ctrl+F
Go to Definition
F12
Peek Definition
Ctrl+Shift+F10
Open Definition to the side
Ctrl+K,F12
Quick Fix
Ctrl+.
Show References
Shift+F12
Rename Symbol
F2
Trim trailing whitespace
Ctrl+K,Ctrl+X
Change file language
Ctrl+K,M

Multi-cursor and selection

Insert cursor*
Alt+Click
Insert cursor above/below
Alt+Shift+Up
or
Alt+Shift+Down
Undo last cursor operation
Ctrl+U
Insert cursor at end of each line selected
Alt+Shift+I
Select current line
Ctrl+L
Select all occurrences of current selection
Ctrl+Shift+L
Select all occurrences of current word
Ctrl+F2
Expand selection
Alt+Shift+Right
Shrink selection
Alt+Shift+Left

Display

Toggle full screen
F11
Toggle editor layout (horizontal/vertical)
Alt+Shift+0
Zoom in/out
Ctrl+=
or
Ctrl+-
Toggle Sidebar visibility
Ctrl+B
Show Explorer / Toggle focus
Ctrl+Shift+E
Show Source Control
Ctrl+Shift+G
Show Debug
Ctrl+Shift+D
Show Extensions
Ctrl+Shift+X
Replace in files
Ctrl+Shift+H
Toggle Search details
Ctrl+Shift+J
Open new command prompt/terminal
Ctrl+Shift+C
Show Output panel
Ctrl+K,Ctrl+H
Open Markdown preview
Ctrl+Shift+V
Open Markdown preview to the side
Ctrl+K,V

Search and replace

Find
Ctrl+F
Replace
Ctrl+H
Find next/previous
F3
or
Shift+F3
Select all occurrences of Find match
Alt+Enter
Add selection to next Find match
Ctrl+D
Move last selection to next Find match
Ctrl+K,Ctrl+D

Editor management

Close editor
Ctrl+W
Close folder
Ctrl+K,F
Split editor
Ctrl+\
Focus into 1st, 2nd, 3rd editor group
Ctrl+1
or
Ctrl+2
or
Ctrl+3
Focus into previous editor group
Ctrl+K,Ctrl+Left
Focus into next editor group
Ctrl+K,Ctrl+Right
Move editor left
Ctrl+Shift+Pg Up
Move editor right
Ctrl+Shift+Pg Dn
Move active editor group left/up
Ctrl+K,Left
Move active editor group right/down
Ctrl+K,Right

File management

New File
Ctrl+N
Open File...
Ctrl+O
Save
Ctrl+S
Save As...
Ctrl+Shift+S
Close
Ctrl+W
Close All
Ctrl+K,Ctrl+W
Reopen closed editor
Ctrl+Shift+T
Keep preview mode editor open
Ctrl+K,Enter
Open next
Ctrl+Tab
Open previous
Ctrl+Shift+Tab
Copy path of active file
Ctrl+K,P
Reveal active file in Explorer
Ctrl+K,R
Show active file in new window/instance
Ctrl+K,O

Debug

Toggle breakpoint
F9
Start / Continue
F5
Step into/out
F11
or
Shift+F11
Step over
F10
Stop
Shift+F5
Show hover
Ctrl+K,Ctrl+I

Integrated terminal

Show integrated terminal
Ctrl+`
Create new terminal
Ctrl+Shift+`
Copy selection
Ctrl+Shift+C
Paste into active terminal
Ctrl+Shift+V
Scroll up/down
Ctrl+Shift+Up
or
Ctrl+Shift+Down
Scroll page up/down
Shift+Pg Up
or
Shift+Pg Dn
Scroll to top/bottom
Shift+Home
or
Shift+End

Intro

VS Code on Linux uses Ctrl as its primary modifier, identical to Windows. If you've used VS Code on Windows, every shortcut transfers directly. The one area that differs on Linux is the surrounding environment: desktop environments can capture some keyboard combinations before VS Code sees them, and VS Code on Linux is where keyboard customization is most commonly needed.

VS Code is among the most popular editors on Linux, used across GNOME, KDE, i3, Sway, and other environments. The shortcut reference here covers VS Code's defaults, what ships before any customization.

Linux-specific shortcut notes

Ctrl as primary modifier. The shortcut set is identical to Windows: Ctrl+Shift+P for the command palette, Ctrl+P for quick file open, Ctrl+` for the integrated terminal, and so on throughout.

Desktop environment conflicts. Some DEs bind keyboard shortcuts at the system level that overlap with VS Code defaults. Common sources of conflict:

  • GNOME: Super key shortcuts (for Activities and app switching) don't conflict with VS Code, but some Alt-based window management shortcuts might. GNOME's keyboard settings (Settings → Keyboard → View and Customize Shortcuts) is where to check and disable conflicting bindings.
  • KDE: KDE's global shortcut system can capture a wider range of Ctrl and Alt combinations. Checking System Settings → Shortcuts → Global Shortcuts before assuming VS Code is the problem is worth doing.
  • Tiling WMs (i3, Sway, etc.): Window manager shortcuts use a configurable mod key (often Super or Alt). Most tiling WM users configure their mod key specifically to avoid application shortcut conflicts. If you use a tiling WM, your configuration likely already handles this.

VS Code keyboard customization on Linux. VS Code's built-in keyboard shortcut editor (accessible from the command palette: search "Open Keyboard Shortcuts") is where to reassign any conflicting shortcut. Linux users tend to use this more than Mac or Windows users because of DE conflicts, it's worth knowing it exists and is easy to use.

Wayland note. VS Code on Wayland (as opposed to X11) handles some keyboard input differently. A small number of shortcut combinations may behave unexpectedly on Wayland. If a shortcut works on X11 but not Wayland, checking VS Code's GitHub issues for the specific combination is the fastest path to a fix.

Printable PDF

The VS Code Linux shortcut list is available as a printable PDF. The shortcut reference covers VS Code's defaults, cross-check against your DE configuration for any shortcuts that don't respond as expected.

FAQ

Need more than shortcuts?
Visit the Visual Studio Code app page for an overview and helpful links.

Want to suggest a new app, report a bug, or get help? Email us at info@hkeys.app.

For anything else or just a quick hello, write to us at info@hkeys.app.