VS Code tips and tricks
Keyboard shortcuts
Section titled “Keyboard shortcuts”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:
File navigation
Section titled “File navigation”| Command | Windows | Mac | | ----------- | ----------- | ----------- | | Open file | Ctrl + P | Cmd + P | | Jump to variable definition | Ctrl + Click | Cmd + Click | | Find in current file | Ctrl + F | Cmd + F | | Find in project | Ctrl + Shift + F | Cmd + Shift + F |
Code editing
Section titled “Code editing”| Command | Windows | Mac | | ----------- | ----------- | ----------- | | Organize imports | Shift + Alt + O | Shift + Option + O | | Move current line up/down | Alt + Up/Down | Option + Up/Down | | Duplicate current line above/below | Shift + Alt + Up/Down | Shift + Option + Up/Down | | Delete current line | Ctrl + Shift + K | Cmd + Shift + K | | Comment/uncomment line | Ctrl + / | Cmd + / |
Terminal
Section titled “Terminal”| Command | Windows | Mac | | ----------- | ----------- | ----------- | | Stop server (in terminal) | Ctrl + C | Cmd + C | | New terminal | Ctrl + Shift + ’ | Cmd + Shift + ` |