VS Code Linux Keyboard Shortcuts

Explore essential VS Code keyboard shortcuts for Linux users. Speed up coding with advanced and time-saving commands. Improve productivity and workflow efficiency.

Total Shortcuts: 116
Categories: 11
Application: Visual Studio Code
Platform:

All Keyboard Shortcuts

116 Shortcuts
Category Shortcut Description Actions
General
Ctrl + Shift + P or F1
Show Command Palette
General
Ctrl + P
Quick Open, Go to File
General
Ctrl + Shift + N
New window/instance
General
Ctrl + W
Close window/instance
General
Ctrl + ,
User Settings
General
Ctrl + K Ctrl + S
Keyboard Shortcuts
Basic Editing
Ctrl + X
Cut line (empty selection)
Basic Editing
Ctrl + C
Copy line (empty selection)
Basic Editing
Alt + or Alt +
Move line down/up
Basic Editing
Ctrl + Shift + K
Delete line
Basic Editing
Ctrl + Enter or Ctrl + Shift + Enter
Insert line below/above
Basic Editing
Ctrl + Shift + \
Jump to matching bracket
Basic Editing
Ctrl + ] or Ctrl + [
Indent/Outdent line
Basic Editing
Home or End
Go to beginning/end of line
Basic Editing
Ctrl + Home or Ctrl + End
Go to beginning/end of file
Basic Editing
Ctrl + or Ctrl +
Scroll line up/down
Basic Editing
Alt + PgUp or Alt + PgDn
Scroll page up/down
Basic Editing
Ctrl + Shift + [ or Ctrl + Shift + ]
Fold/unfold region
Basic Editing
Ctrl + K Ctrl + [ or Ctrl + K Ctrl + ]
Fold/unfold all subregions
Basic Editing
Ctrl + K Ctrl + 0 or Ctrl + K Ctrl + J
Fold/Unfold all regions
Basic Editing
Ctrl + K Ctrl + C
Add line comment
Basic Editing
Ctrl + K Ctrl + U
Remove line comment
Basic Editing
Ctrl + /
Toggle line comment
Basic Editing
Ctrl + Shift + A
Toggle block comment
Basic Editing
Alt + Z
Toggle word wrap
Rich Languages Editing
Ctrl + Space or Ctrl + I
Trigger suggestion
Rich Languages Editing
Ctrl + Shift + Space
Trigger parameter hints
Rich Languages Editing
Ctrl + Shift + I
Format document
Rich Languages Editing
Ctrl + K Ctrl + F
Format selection
Rich Languages Editing
F12
Go to Definition
Rich Languages Editing
Ctrl + Shift + F10
Peek Definition
Rich Languages Editing
Ctrl + K F12
Open Definition to the side
Rich Languages Editing
Ctrl + .
Quick Fix
Rich Languages Editing
Shift + F12
Show References
Rich Languages Editing
F2
Rename Symbol
Rich Languages Editing
Ctrl + K Ctrl + X
Trim trailing whitespace
Rich Languages Editing
Ctrl + K M
Change file language
Multi-cursor and Selection
Alt + Click
Insert cursor
Multi-cursor and Selection
Shift + Alt + or Shift + Alt +
Insert cursor above/below
Multi-cursor and Selection
Ctrl + U
Undo last cursor operation
Multi-cursor and Selection
Shift + Alt + I
Insert cursor at end of each line selected
Multi-cursor and Selection
Ctrl + L
Select current line
Multi-cursor and Selection
Ctrl + Shift + L
Select all occurrences of current selection
Multi-cursor and Selection
Ctrl + F2
Select all occurrences of current word
Multi-cursor and Selection
Shift + Alt +
Expand selection
Multi-cursor and Selection
Shift + Alt +
Shrink selection
Multi-cursor and Selection
Shift + Alt + drag mouse
Column (box) selection
Display
F11
Toggle full screen
Display
Shift + Alt + 0
Toggle editor layout (horizontal/vertical)
Display
Ctrl + = or Ctrl + -
Zoom in/out
Display
Ctrl + B
Toggle Sidebar visibility
Display
Ctrl + Shift + E
Show Explorer / Toggle focus
Display
Ctrl + Shift + F
Show Search
Display
Ctrl + Shift + G
Show Source Control
Display
Ctrl + Shift + D
Show Debug
Display
Ctrl + Shift + X
Show Extensions
Display
Ctrl + Shift + H
Replace in files
Display
Ctrl + Shift + J
Toggle Search details
Display
Ctrl + Shift + C
Open new command prompt/terminal
Display
Ctrl + K Ctrl + H
Show Output panel
Display
Ctrl + Shift + V
Open Markdown preview
Display
Ctrl + K V
Open Markdown preview to the side
Display
Ctrl + K Z
Zen Mode (Esc Esc to exit)
Search and Replace
Ctrl + F
Find
Search and Replace
Ctrl + H
Replace
Search and Replace
F3 or Shift + F3
Find next/previous
Search and Replace
Alt + Enter
Select all occurrences of Find match
Search and Replace
Ctrl + D
Add selection to next Find match
Search and Replace
Ctrl + K Ctrl + D
Move last selection to next Find match
Navigation
Ctrl + T
Show all Symbols
Navigation
Ctrl + G
Go to Line
Navigation
Ctrl + P
Go to File
Navigation
Ctrl + Shift + O
Go to Symbol
Navigation
Ctrl + Shift + M
Show Problems panel
Navigation
F8
Go to next error or warning
Navigation
Shift + F8
Go to previous error or warning
Navigation
Ctrl + Shift + Tab
Navigate editor group history
Navigation
Ctrl + Alt + -
Go back
Navigation
Ctrl + Shift + -
Go forward
Navigation
Ctrl + M
Toggle Tab moves focus
Editor Management
Ctrl + W
Close editor
Editor Management
Ctrl + K F
Close folder
Editor Management
Ctrl + \
Split editor
Editor Management
Ctrl + 1 or Ctrl + 2 or Ctrl + 3
Focus into 1st, 2nd, 3rd editor group
Editor Management
Ctrl + K Ctrl +
Focus into previous editor group
Editor Management
Ctrl + K Ctrl +
Focus into next editor group
Editor Management
Ctrl + Shift + PgUp
Move editor left
Editor Management
Ctrl + Shift + PgDn
Move editor right
Editor Management
Ctrl + K ←
Move active editor group left/up
Editor Management
Ctrl + K →
Move active editor group right/down
File Management
Ctrl + N
New File
File Management
Ctrl + O
Open File
File Management
Ctrl + S
Save
File Management
Ctrl + Shift + S
Save As
File Management
Ctrl + W
Close
File Management
Ctrl + K Ctrl + W
Close All
File Management
Ctrl + Shift + T
Reopen closed editor
File Management
Ctrl + K Enter
Keep preview mode editor open
File Management
Ctrl + Tab
Open next
File Management
Ctrl + Shift + Tab
Open previous
File Management
Ctrl + K P
Copy path of active file
File Management
Ctrl + K R
Reveal active file in Explorer
File Management
Ctrl + K O
Show active file in new window/instance
Debug
F9
Toggle breakpoint
Debug
F5
Start / Continue
Debug
F11 or Shift + F11
Step into/out
Debug
F10
Step over
Debug
Shift + F5
Stop
Debug
Ctrl + K Ctrl + I
Show hover
Integrated Terminal
Ctrl + `
Show integrated terminal
Integrated Terminal
Ctrl + Shift + `
Create new terminal
Integrated Terminal
Ctrl + Shift + C
Copy selection
Integrated Terminal
Ctrl + Shift + V
Paste into active terminal
Integrated Terminal
Ctrl + Shift + or Ctrl + Shift +
Scroll up/down
Integrated Terminal
Shift + PgUp or Shift + PgDn
Scroll page up/down
Integrated Terminal
Shift + Home or Shift + End
Scroll to top/bottom

Why Keyboard Shortcuts Matter

Keyboard shortcuts are essential for developer productivity. They allow you to perform actions quickly without moving your hands away from the keyboard, maintaining your coding flow and focus. Studies show that developers using keyboard shortcuts can be up to 30% more productive than those relying heavily on mouse interactions.

Increased Productivity

Perform actions 3-5x faster than using mouse navigation.

Reduced Context Switching

Stay focused on coding without breaking flow to reach for mouse.

Ergonomic Benefits

Reduce repetitive strain by keeping hands on home row position.

Professional Skill

Essential skill for professional developers and power users.

Frequently Asked Questions (Linux Specific)

Super key (Windows key) shortcuts might be intercepted by your Linux desktop environment:
  1. GNOME: Check Settings → Keyboard → Shortcuts for conflicts
  2. KDE: Check System Settings → Shortcuts for conflicts
  3. XFCE: Check Settings → Window Manager → Keyboard
  4. Solution: Rebind conflicting system shortcuts or use different VS Code shortcuts

Note: Some desktop environments reserve Super+Space for keyboard layout switching.

Ctrl+Alt+ shortcuts might conflict with system-level shortcuts:
  • Common conflicts: Ctrl+Alt+Arrow keys (workspace switching), Ctrl+Alt+Function keys (terminal switching)
  • Solution 1: Disable system shortcuts in desktop environment settings
  • Solution 2: Use different VS Code shortcuts (e.g., Ctrl+Shift+ instead)
  • Solution 3: Use XKB configuration to remap system shortcuts
  • Check: Run xmodmap -pke | grep "Control+Alt" to see current mappings

VS Code stores settings in different locations based on installation:
  1. User Settings: ~/.config/Code/User/settings.json
  2. Keyboard Shortcuts: ~/.config/Code/User/keybindings.json
  3. Global Storage: ~/.config/Code (for extensions and cache)
  4. Snap Installation: ~/snap/code/current/.config/Code/User/
  5. Flatpak Installation: ~/.var/app/com.visualstudio.code/config/Code/User/

Use code --user-data-dir to specify a different location.

VS Code shortcuts work with different keyboard layouts, but there are considerations:
  • US Layout: All shortcuts work as documented
  • Non-US Layouts: Some key positions may differ (e.g., brackets, special characters)
  • Solution 1: Use the same physical keys regardless of layout
  • Solution 2: Customize shortcuts in keybindings.json for your layout
  • Tip: Use Ctrl+Shift+P → "Developer: Inspect Key Mappings" to see current key codes

For programming, many developers use US International layout regardless of their language.

VS Code works with Wayland, but there might be differences:
  • Electron: VS Code uses Electron which has good Wayland support
  • Clipboard: Wayland's clipboard might behave differently with some shortcuts
  • Shortcut Conflicts: Wayland compositors (GNOME Shell, KWin, Sway) might intercept different shortcuts
  • Solution: Run with --enable-features=UseOzonePlatform --ozone-platform=wayland flags
  • Check: Use echo $XDG_SESSION_TYPE to see if you're on Wayland or X11

Most keyboard shortcuts work the same on Wayland as on X11.