VS Code Tips
- Open a directory on VS Code with
code .
. Ctrl + P
opens the Command Palette.- Type
>
in the command palette to run any command in VS Code. - Use
Quokka
to run JavaScript on the file itself. @
inside the command palette, or enteringCtrl + Shift + .
let’s you find symbols in a file.- To find a symbol throughout the entire project, enter
#
followed by the name of the symbol inside the command palette.Instead of searching
#ReallyLongClassname
, just do#RLC
:
inside command palette orCtrl + G
lets us move to any line by the line number.- Use
Ctrl + → / ←
to move word by word. Hold down theShift
key to highlight. - To highlight a word that the cursor is on, hit
Ctrl + D
(to Delete / Replace it). To highlight a line, doCtrl + L
. - Hit
Ctrl + D
again and again to select multiple occurences of the same word. - Set multiple cursors by
Alt + Click
. - Auto Rename Tag extension lets us rename closing tags on languages like HTML by editing the opening tag.
- To delete / cut a line, do
Ctrl + X
. - Use
Alt + ↑ / ↓
to move a line up or down. To copy a line, doAlt + Shift + ↑ / ↓
. - Comment easily using
Ctrl + /
. - Open the terminal using
Ctrl + `
. Open a new terminal window by hittingCtrl + Shift + `
.