Visual Studio Code - Keyboard shortcuts
Code editor
- opt + shift + down arrow: copy line down
- opt + up/down arrow: move line of code up and down
- opt + click: edit multiple locations at the same time
- opt + cmd + up/down arrow: editing multiple lines at the same time
- cmd + d (and d again): editing html start and end tags at the same time
- cmd + shift + k : delete a line of code
- shift + opt + p : format document
Folding and unfolding code
- all: cmd+k, cmd+j
- fold all: cmd+k,cmd+0
- fold level 1: cmd+k, cmd+1
- fold level 2: cmd+k, cmd+2
- fold level n: cmd+k, cmd+n
Other useful commands
- ^ + shift + ` : to open terminal in VScode
- opt + z: Toggle word wrap
- cmd + ,: to access settings menu
- cmd + T; open a file by matching text
- cmd + p : search for file name
References
Tags: vscode