genkio / blog

Stay hungry stay foolish
https://slashbit.github.io/blog/
0 stars 1 forks source link

Awesome vscode #139

Open genkio opened 7 years ago

genkio commented 7 years ago

Getting started

  1. Turn on trimTrailingWhitespace on saving in settings.
  2. Change both editor and terminal font-size to 14px.
  3. Turn on insert final newline setting.
  4. Install essential extensions:
    • [x] ESLint
    • [ ] TSLint
    • [x] Code Spell Checker
    • [x] Simple Vim
    • [x] Atom One Dark Theme
    • [x] Bracket Pair Colorizer
    • [x] Prettier - Code formatter

Keyboard shortcuts

the obvious ones are not included here, and these shortcuts are only applicable in macOS

shift cmd m to to reveal the 'errors and warnings' panel. cmd , to open settings.json. ctrl ` to open integrated terminal. cmd k z to activate the zen mode! cmd \ to enable side by side editing. cmd 1 or 2 to switch between (side by side) editors. cmd left or right to go to beginning or end of the line. cmd opt up or down to enable multi-cursor.

cmd shift left or right to select current line. ctrl - to go to definition navigate back. ctrl shift - to go to definition navigate forward. ctrl shift cmd left or right to expand or shrink selection. alt cmd [ or ] to fold or unfold a block of code.

  // keybindings.json
  // Toggle between terminal and editor focus
  { "key": "ctrl+`", "command": "workbench.action.terminal.focus" },
  {
    "key": "ctrl+`",
    "command": "workbench.action.focusActiveEditorGroup",
    "when": "terminalFocus"
  }

Hidden features

cmd shift p shell to install 'code' command in path. cmd shift p file icon to change the file icon theme.

Recommended settings

{
  "editor.fontSize": 14,
  "editor.tabSize": 2,
  "editor.insertSpaces": true,
  "files.trimTrailingWhitespace": true,
  "workbench.iconTheme": "vs-seti",
  "emmet.syntaxProfiles": {
    "vue-html": "html",
    "vue": "html"
  },
  "window.zoomLevel": 0,
  "view-in-browser.customBrowser": "chrome",
  "editor.multiCursorModifier": "ctrlCmd"
}

Extensions

ESLint by Dirk Baeumer Python by Don Jayamanne vetur by Pine Wu Git Blame by Wade Anderson Code Runner by Jun Han Code Spellchecker by Street Side Software Flow Language Support by flowtype Git History (git log) by Don Jayamanne Insert Date String by jsynowiec