Cheat Sheets

VS Code

Created: 2019 May 27th

Updated: 2019 August 18th

Edit this page on GitHub

Want to list out what extensions you have installed?

Say that you are moving from VS Code to VS Code Insiders and you want to install the same extensions:

1code --list-extensions | xargs -L 1 echo code-insiders --install-extension

Moving from VS Code Insiders to VS Code? Then swap round the commands:

1code-insiders --list-extensions | xargs -L 1 echo code --install-extension

Want to have your own keyboard shortcut?

In some cases moving from one platform to another (Windows to Linux say) they keyboard shortcuts are different or just plain not there.

You can create your own keyboard shortcuts but it’s buried in the GUI settings for some reason.

In VSCode goto File -> Preferences -> Keyboard shortcuts., then over on the top right you can select the icon for Open Keyboard Shortcuts (JSON).

Paste in your shortcut, in this case duplicating lines, which is missing in Ubuntu VS Code:

1// Place your key bindings in this file to override the defaults
2[
3 {
4 "key": "shift+alt+down",
5 "command": "editor.action.copyLinesDownAction",
6 "when": "editorTextFocus && !editorReadonly"
7 },
8 {
9 "key": "shift+alt+up",
10 "command": "editor.action.copyLinesUpAction",
11 "when": "editorTextFocus && !editorReadonly"
12 }
13]