https://code.visualstudio.com/docs/getstarted/keybindings
Visual Studio Code lets you perform most tasks directly from the keyboard.
Table of Contents
ctrl
: Control⇧
: Shiftalt
: Alt
ctrl P
: Quick Openctrl ⇧ P
: Show All Commands (>
)ctrl T
: Show All Symbols (#
)ctrl ⇧ O
: Go to Symbol (@
)- Type
:
to group symbols.
- Type
ctrl G
: Go to Line (:
)alt ←
: Go Backalt →
: Go Forward
Note: Show All Symbols
command can be less usable if your project imports many dependencies. (microsoft/vscode#46718)
- Show all commands.
- Type 'Open Recent' and run
File: Open Recent...
command. - Open any projects.
- Run
Quick Open
command and type#
to show all symbols. - Go to any function with name (like
deleteUser
). - Run
Go to Symbol
command and type:
to group symbols. - Go to any function.
- Go back.
- Go forward.
- Go to line 1.
ctrl B
: Toggle Sidebarctrl ⇧ P
: Toggle Integrated Terminalctrl `
: Focus/Toggle Integrated Terminalctrl ⇧ E
: Show Explorerctrl ⇧ F
: Show Searchctrl K Z
: Toggle Zen Mode
ctrl \
: Splitctrl 1
: Focus into first editor groupctrl 2
: Focus into second editor group
ctrl alt →
: Into Next Groupctrl alt ←
: Into Previous Group
ctrl W
: Thisctrl K W
: Groupctrl ⇧ T
: Reopen
- Split this editor twice.
- Focus into second editor group.
- Open
code.js
. - Move code.js to third editor group.
- Close third editor group.
- Close all editor groups.
ctrl ⇧ Enter
: Insert Line Abovectrl Enter
: Insert Line Belowalt ↓
: Move Line Downalt ↑
: Move Line Up
- Insert a line (cursor here) below and type
3. Done.
. - Move this line up.
ctrl D
: Add Selection To Next Find Matchctrl ⇧ L
: Select all occurrences of current selectionctrl →
: Move Cursor to next word partctrl ←
: Move Cursor previous word partctrl ⇧ →
: Select to next word partctrl ⇧ ←
: Select to previous word partctrl U
: Undo last cursor operation
- Select next 😃.
- Select all 😃 and delete them.
- 😃R😃e😃m😃o😃v😃e
Not
fromshortcutsWillNotMakeYourMoreProductive
.
ctrl alt ↓
: Insert Cursor Belowctrl alt ↑
: Insert Cursor Abovealt + click
: Insert Cursor
- Change first character of the below lines to upper case.
- remove emojis in the line below with inserting cursor with click.
- go😂od j🧘🏻♂️o🌍b!
- Open
Keyboard Shortcuts
withctrl shift p
. - Click
Open Keyboard Shortcuts (JSON)
on the right top corner. - Copy & paste the code below in the JSON array.
- Use
ctrl alt ↓
to go to 5 lines below.
{
"key": "ctrl+alt+up",
"command": "cursorMove",
"args": {
"to": "up",
"by": "line",
"value": 5
},
"when": "editorTextFocus"
},
{
"key": "ctrl+alt+down",
"command": "cursorMove",
"args": {
"to": "down",
"by": "line",
"value": 5
},
"when": "editorTextFocus"
}