DEV Community

Mohammed Ali
Mohammed Ali

Posted on • Edited on

35+ VS Code Shortcuts & Snippets [Live Doc]

Ctrl +

F4 = Close tab
Tab = Prev Tab
P = Displays Search bar for file search
\ = Split the code into two windows. Click repeatedly to open more.
D = Simultaneously select same occurrences of the word.
F = Find word inside file.
G = Jump to line no
H = Replace the word
J / ` = Terminal
L = Select the entire line
R = Recently opened files
T = Search a method
W = Close window
Z = Undo
X = Cut the line to be pasted
B = Toggle Project Sidebar Left Sidebar
, = Settings
. = Quickfix
/ = Toggle Comment
Space = Show suggestions
Arrow = Jump the pointer word by word

Ctrl + Alt +

N = Run the code
Arrow Key = Gives multiple cursors to be clicked

Ctrl + Shift +

` = Creaet a new terminal instance
5 = Split terminal instance
L = Multi cursor selection of the same word for editing
[ = Code Folding
] = Code unfolding
F = Search for something across the project.

Alt +

Up/Down = Move the line upward or downward using arrow keys
Click = Multi-cursor Edit

Shift +

Shift + F5 = Stop debugging
F11 = Step out of the current fn or method

Shift + Alt +

Up/Down = Copy entire line
F = Format the code

Function Keys

F5 = Debugging Window
F9 = Toggle breakpoints i.e pause execution at specific lines.
F10 = Step over, i.e Move to the next line of code without stepping inside the fn.
F11 = Step into the methods to debug them line by line.

Snippets:

Emmet = https://docs.emmet.io/cheat-sheet/
Standard JS

React = https://github.com/r5n-dev/vscode-react-javascript-snippets/blob/HEAD/docs/Snippets.md#snippets-info

Top comments (0)