Skip to content

Instantly share code, notes, and snippets.

@ivawzh
Last active July 20, 2023 05:41
Show Gist options
  • Save ivawzh/9dcc1cd80a790e4eb91a07a78d829941 to your computer and use it in GitHub Desktop.
Save ivawzh/9dcc1cd80a790e4eb91a07a78d829941 to your computer and use it in GitHub Desktop.
vscode cheat sheet

Ivan Wang's VSCode cheat sheet

Basic

Extensions

  1. Atom Keymap for typical Electron app short cuts.

Settings

  1. cmd + shift + P and search for Preferences: Open User Settings (JSON).

    The essential settings almost everyone should have:

    {
        "files.autoSave": "onFocusChange",
        "files.encoding": "utf8bom",
        "files.autoGuessEncoding": true,
        "files.eol": "\n",
    }
    
  2. cmd + shift + P and search for Preferences: Open Keyboard Shortcuts (JSON).

    {
      "key": "alt+cmd+f",
      "command": "-editor.action.startFindReplaceAction"
    },
    {
      "key": "cmd+r",
      "command": "editor.action.startFindReplaceAction"
    },
    {
      "key": "shift+cmd+r",
      "command": "workbench.action.replaceInFiles",
      "when": "!editorFocus"
    },
    

Shortcuts

  • Search for a VS Code command cmd + shift + P
  • Find file cmd + T
  • Close tab cmd + W
  • Reopen a closed tab cmd + shift + T
  • Search in a file cmd + F
  • Replace in a file cmd + R
  • Global search in all files cmd + shift + F
  • Global replace in all files cmd + shift + R
  • Rename a thing in a smart way F2
  • Trace link alt + click
  • Move line cmd + ctl + UP/DOWN
  • Delete line cmd + shift + K or just cut cmd + X

Advance

Extensions

  1. change-case
  2. Copilot
  3. GitLens
  4. Turbo Console Log

Shortcuts

  • Create multiple cursor cmd + click
  • Find and add to selection cmd + D
  • Create multi cursors at selected lines cmd + shift + L
  • Search and select all in a file: cmd + F, type in search word and then alt + ENTER
  • Create JS console log ctr + alt + L
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment