Skip to content

VSCode

Side Menu

shortcut description
⌘ + B Hide show side menu
⌘ + ⇧ + E Explorer window
⌘ + ⇧ + F Find window
⌘ + ⇧ + J Find in files window
⌃ + ⇧ + G Git window
⌘ + ⇧ + D Debug window
⌘ + ⇧ + X Extension window

Multi-Cursor Editing

shortcut description
⌘ + ⌥ + ↓ add a new cursor below
⌥ + Click add a new cursor at the mouse click
⌘ + ⇧ + L add new cursor behind all instances of a word

Split editor

shortcut description
⌘ + \ split

Split Window focusing

shortcut description
⌘ + 0 explorer panel
⌘ + 1 1st window split window
⌘ + 2 2nd window split window
⌃ + ~ terminal window
^ + tab switch between tabs
⌘ + ~ switch between VS code editor windows

IntelliSense

shortcut description
⌃ + Space to invoke IntelliSense

Line Action

shortcut description
⇧ + ⌥ + ↓ copy the line and insert below
⇧ + ⌥ + ↑ copy the line and insert above
⌥ + ↓ move entire line below
⌥ + ↑ move entire line above
⌘ + ⇧ + K delete entire line

Rename Refactoring

shortcut description
F2 (Fn + F2) Rename Symbol in the current project
Right Mouse Click -> Rename Symbol Rename Symbol in the current project

Formatting

shortcut description
⇧ + ⌥ + F format entire document
⌘ + K and ⌘ F format selected text

Transform selected

shortcut description
^ + ⇧ + ⌥ + L transform selected to lower
^ + ⇧ + ⌥ + U transform selected to upper
^ + ⇧ + ⌥ + S transform selected to snake
^ + ⇧ + ⌥ + T transform selected to titelcase

Code Folding

shortcut description
⌘ + ⌥ + [ fold
⌘ + ⌥ + ] unfold
⌘ K and ⌘ 0 fold all
⌘ K and ⌘ J unfold all
⌘ K and ⌘ 1 fold 1 level
⌘ K and ⌘ 2 fold 2 levels
⌘ K and ⌘ 5 fold 5 levels

Errors and Warnings

shortcut description
F8 navigate across errors

Code Server

/lib/systemd/system/code-server.service

[Unit]
Description=code-server
After=nginx.service

[Service]
Type=simple
User=lully
ExecStart=/usr/local/bin/code-server serve
Restart=always

[Install]
WantedBy=multi-user.target

Sources

  • https://code.visualstudio.com/docs/remote/vscode-server
  • https://github.com/coder/code-server