Skip to content

Vs Code Notes

Vscode notes

Type code in terminal to open vs code

open current directory with code .

Cmd + p to open palette to search files

Cmd + shift + p to open settings and extensions search / or cmd + p and > This is very powerful for working out how to do what you want to in the editor.

cmd + shift + @ to search symbols in current file - this can be good to look between headings in markdown or symbols in code. This is quicker than scrolling.

can get js logs to show with cmd shift p and js repl run

cmd + b to open explorer

cmd + w to close file

cmd + o to open file or folder/repo

cmd + s to save file

Can press collapse all button in file explorer to close folders.

can set keyboard shortcuts in settings. Default ones in this folder.

ctrl + space to force intellisense (autocomplete) to show up. Use arrow keys to go through list of autosuggestions and tab to select.

ctrl + shift + space to bring up parameter hints

//////

press shift tab to unindent, or tab to indent.

  • to search all settings

  • *format document* to sort out indents
    • configure user snippets to add snippets of code
    • configure defabuild task
  • @ to list all symbols in the code to quickly navigate to it

Cmd shift . to search for symbols directly in file

ctrl g - go to line in code to highlight it

hold down shift key to highlight text while going through it with arrow key

ctrl d to find text and highlight it

when you land on something you want to edit, cntrl-d to edit all instances of that word.

alt-click to set up multiple cursors - edit in different places.

ctrl x to cut a line and use keys to move, _cntrl v _

alt - up down arrows to move a line up down easily

alt shift - up down arrows to copy code

cmd l to highlight line

cmd / to toggle comments

Better Comments VS Code extension is good, see documentation for it on vscode extentions

cmd ’ to open new luma paint editor file png

ctrl ` to open new terminal

  • Can name terminals
  • ctrl k to clear out terminal
  • up arrow to go to last command/scroll between them with up and down

from here

  • shift alt down arrow to copy current element down one line. Might have to select text if need to copy multiple lines.
  • press cmd j in vs code to hide show terminal
  • press up down arrow keys to scroll through previous commands
  • press alt z to wrap code - can be useful to see stuff when on split screen.

cmd d when selecting to select other instances of it