VScode Keyboard Shortcuts
The Ever-expanding List of Frequently Used Keyboard Shortcuts
cmd + shift + \
For finding a matching bracket (especially useful if you're not using an extension that does that for you - like Rainbow Brackets).
cmd + p
Quick open, go to file.
cmd + p + p
Toggle back and forth between two files (equal to
ctrl + tab).
cmd + .
To toggle the auto-fix menu (for fixing indentation, etc.). This is especially useful if you're not using Prettier.
cmd + 0
Bring focus to the sidebar.
cmd 1 to bring the focus back to the code editor.
ctrl + [num]
Jump from tab to tab (e.g., first tab is
ctrl + 1).
Toggle rename mode: this will change the name of that constant wherever it occurs (great for refactoring).
Go to the next error or warning.
Go to the definition (great for exploring the codebase).
cmd + down arrow
Open a file while in file explorer (pressing the enter key will rename the file).
cmd + d
Select multiple instances.
alt + up arrow
Move a line of code up (you can move it down with the down arrow instead).
shift + alt + down arrow
Duplicate lines of code down (you can do it upward, by using the up arrow instead).
alt + right arrow
Navigate the code, word by word going right (you can go left by using the left arrow instead).
cmd + right arrow
Jump to the end of the line (
cmd + left arrow for the beginning of the line).
cmd + l
Select the current line. Press the
l key repeatedly to select more lines (expanding downward).
cmd + shift + k
Delete the current line.
cmd + shift + enter
Insert a line above.
cmd + [
Increase indentation (with closing square bracket to decrease indentation).
cmd + up arrow
Jump to the top of the file (use the down arrow to jump to the bottom of the file).
ctrl + g
Navigate to a specific line number.
cmd + backspace
Delete everything and place cursor to the start of that line.
cmd + k + v
Open markdown preview (for markdown files).
cmd + shift + .
cmd + pthen
Go to the command palette, then press
@ to navigate to the different sections of the file.
cmd + down arrow + .
Open the file (through directory explorer). Pressing
enter will toggle the rename mode.
cmd + k + j
Open a Quokka workspace - prototyping playground.
cmd + ,
Go to user settings.
cmd + k + cmd + S
Open keyboard shorcuts.
alt + w + w
Close all files and collapse the directory tree.
capslock + right arrow
capslock as an extra modifier key (via Karabiner-Elements), this combination splits the screen horizontally to the right (useful for comparing two files).
capslock + F
Toggle full screen.