Skip to content

VS Code tips and tricks

VS Code has a lot of keyboard shortcuts that can help you navigate and edit your code faster.

Here are some of ones that I have found most useful, but a full list can be found via the links below:

Windows | Mac

CommandWindowsMac
Open fileCtrl + PCmd + P
Jump to variable definitionCtrl + ClickCmd + Click
Find in current fileCtrl + FCmd + F
Find in projectCtrl + Shift + FCmd + Shift + F
CommandWindowsMac
Organize importsShift + Alt + OShift + Option + O
Move current line up/downAlt + Up/DownOption + Up/Down
Duplicate current line above/belowShift + Alt + Up/DownShift + Option + Up/Down
Delete current lineCtrl + Shift + KCmd + Shift + K
Comment/uncomment lineCtrl + /Cmd + /
CommandWindowsMac
Stop server (in terminal)Ctrl + CCmd + C
New terminalCtrl + Shift + β€˜Cmd + Shift + `