Reference:
- https://code.visualstudio.com/docs/getstarted/keybindings
- https://code.visualstudio.com/shortcuts/keyboard-shortcuts-linux.pdf
Switch to a different workspace
Open command palette Ctrl-Shift-P
Open file picker Ctrl-P Switch to previous file Ctrl-P Ctrl-P... Go to symbol Ctrl-T Go to Symbol in Editor Ctrl-Shift-O Go to Symbol in Editor (grouped) Ctrl-Shift-O :
Focus explorer / editor Ctrl-Shift-E
Focus sidebar
Focus in/out of terminal Ctrl-`
More terminal shortcuts here: https://www.mcieslar.com/learn-these-keyboard-shortcuts-to-become-a-vs-code-ninja
Toggle panel below editor Ctrl-J Toggle sidebar panel Ctrl-B
Save All
Open settings
Open keyboard shortcuts
Switch Window (between projects)
Open Recent (project)
New File Ctrl-N
New Window Ctrl-Shift-N Close Window
Change focus to a different panel
Autocomplete / suggest Ctrl-Space
Format document
Organise imports
Join lines
Delete line Ctrl-Shift-K
Start new line below Ctrl-Enter Start new line above Ctrl-Shift-Enter
Move line up/down Alt-Up/Down
Toggle line comment
Toggle block comment
Rename a symbol
Insert line below
Insert line above
Select word under cursor Ctrl-D aka Add Selection To Next Find Match Cursor Undo (reverse last Ctrl-D) Ctrl-U
Select all occurrences of selection
(useful for renaming something)
Select all occurrences of word
Expand/shrink selection Cmd-Ctrl-Shift-Right/Left
Stretch vertical cursor up/down Alt-Shift-Right/Left
Go back
Go forward
Go to Definition
Peek References
Find All References
Scroll file up/down
Go to line
Top/bottom of file
Keep current file open Ctrl-K Enter or Ctrl-S
Focus breadcrumbs
Navigate next/previous in breadcrumbs
Search in window Ctrl-F Replace in window Ctrl-H Repeat search Ctrl-G
Search in files
Focus next search result F4
Focus previous search result Shift-F4
Replace in files
Apply the current replacement (one)
Remove the current replacement (one)
Apply all the replacements
Toggle case sensitive
Toggle match whole word
Toggle regular expression
Toggle extra search options Ctrl-Shift-J
Split Editor Right
Split Editor Down
Focus sidebar / split 1 / split 2
Split Open from dropdown menu
Unfold All
Fold to Level 2
Fold
Unfold
Fold recursively
Unfold recursively
(Note when folding, your cursor may need to be outside the area to be folded.)
Quick Fix... Ctrl-. Auto Fix...
Show intellisense for focused code Ctrl-K Ctrl-I
Show details of error under cursor F8
Refactor
Specific sidebar Ctrl-Shift-E Ctrl-Shift-F Ctrl-Shift-G Ctrl-Shift-D Ctrl-Shift-X