A key to be more productive with Visual Studio Code is to use the builtin keyboard shortcuts. You can view the full list of keyboard shortcuts by going to File > Preferences > Keyboard Shortcuts
.
Note: Some of these shortcuts may differ based on the specific operating system or keyboard layout you're using (here for german layout).
Here you can view almost all keyboard shortcuts in one overview.
Here you can search and run all Commands. You can also map a command to a Keyboard shortcut here.
- Show Command Palette:
Windows/Linux:
Ctrl + Shift + P
MacOS:Cmd + Shift + P
-
New window/instance: Windows/Linux:
Ctrl + Shift + N
MacOS:Cmd + Shift + N
-
Close editor: Windows/Linux:
Ctrl + W
MacOS:Cmd + W
-
Close window/instance: Windows/Linux:
Ctrl + Shift + W
MacOS:Cmd + Shift + W
-
Toggle Sidebar: Windows/Linux:
Ctrl + B
MacOS:Cmd + B
-
Close all open taps: Windows/Linux:
Ctrl + K + W
MacOS:Cmd + K + W
-
Fold {}: Windows/Linux:
Ctrl + Shift + ß
MacOS:Cmd + Shift + ß
-
Unfold {}: Windows/Linux:
Ctrl + Shift + ´
MacOS:Cmd + Shift + ´
-
Split editor view: Windows/Linux:
Ctrl + ^
MacOS:Cmd + ^
-
Zen Mode: Windows/Linux:
Ctrl + K + Z
MacOS:Cmd + K + Z
-
MarkDown Preview: Windows/Linux:
Ctrl + K + V
MacOS:Cmd + K + V
-
Quick Open file from Workspace: Windows/Linux:
Ctrl + P
MacOS:Cmd + P
-
Next editor: Windows/Linux:
Ctrl + Tab
MacOS:Cmd + Tab
-
Previous editor: Windows/Linux:
Ctrl + Shift + Tab
MacOS:Cmd + Shift + Tab
-
Go back: Windows/Linux:
Alt + Left Arrow
MacOS:Ctrl + Cmd + Left Arrow
-
Go forward: Windows/Linux:
Alt + Right Arrow
MacOS:Ctrl + Cmd + Right Arrow
-
Global Find: Windows/Linux:
Ctrl + Shift + F
MacOS:Cmd + Shift + F
-
Show outline of file: Windows/Linux:
Ctrl + Shift + .
MacOS:Cmd + Shift + .
-
Go to specific Line: Windows/Linux:
Ctrl + G
MacOS:Cmd + G
-
Cut Line: Windows/Linux:
Ctrl + X
MacOS:Cmd + X
-
Copy Line: Windows/Linux:
Ctrl + C
MacOS:Cmd + C
-
Highlight: Windows/Linux:
Shift + Left/Right Arrow
MacOS:Shift + Left/Right Arrow
-
Highlight word: Windows/Linux:
Ctrl + Shift + Left/Right Arrow
MacOS:Cmd + Shift + Left/Right Arrow
-
Highlight word and put multiple cursor to next same words: Windows/Linux:
Ctrl + D
MacOS:Cmd + D
-
Select all occurrences of current selection: Windows/Linux:
Ctrl + Shift + L
MacOS:Cmd + Shift + L
-
Insert Snippet: Windows/Linux:
Shift + Alt + J
MacOS:Shift + Option + J
-
Copy Line: Windows/Linux:
Shift + Alt + Up/Down Arrow
MacOS:Shift + Option + Up/Down Arrow
-
Add cursor above/below: Windows/Linux:
Ctrl + Alt + Up/Down
MacOS:Ctrl + Option + Up/Down
-
Undo last cursor operation: Windows/Linux:
Ctrl + U
MacOS:Cmd + U
-
Comment line: Windows/Linux:
Ctrl + #
MacOS:Cmd + #
-
Comment highlighted array out: Windows/Linux:
Shift + Alt + A
MacOS:Shift + Option + A
-
Multiple Line cursor: Windows/Linux:
Ctrl + Alt + Up/Down Arrow
or hold Alt and CLICK MacOS:Cmd + Option + Up/Down Arrow
or hold Option and CLICK -
Select current Line: Windows/Linux:
Ctrl + L
MacOS:Cmd + L
-
Move line up/down: Windows/Linux:
Alt + Up/Down Arrow
MacOS:Option + Up/Down Arrow
-
Delete line: Windows/Linux:
Ctrl + Shift + K
MacOS:Cmd + Shift + K
-
Insert line below: Windows/Linux:
Ctrl + Enter
MacOS:Cmd + Enter
-
Insert line above: Windows/Linux:
Ctrl + Shift + Enter
MacOS:Cmd + Shift + Enter
-
Format Text: Windows/Linux:
Shift + Alt + F
MacOS:Shift + Option + F
by Philipp B.