Editor: VS Code
Misc links:
Custom snippets: https://code.visualstudio.com/docs/customization/userdefinedsnippets
HTML with Emmet: http://code.visualstudio.com/docs/languages/html#_emmet-snippets
Hotkeys
Sidebar
Toggle side pane:
CMD+B
Explorer:
Switch to file pane:
SHIFT+CMD+E(How to remember? Same hotkey prefix for find:SHIFT+CMD+F)Open file in next pane: Hold
CMDwhile click the file orCMD+ENTER
Search:
Swith to the search pane:
SHIFT+CMD+F(simialr to Explorer pane:SHIFT+CMD+E)Switch search history:
ALT+UP/DOWNPath glob pattern:
Click on the toggle to the right to enable the glob pattern syntax: * to match one or more characters in a path segment ? to match on one character in a path segment ** to match any number of path segments, including none {} to group conditions (e.g. {**/*.html,**/*.txt} matches all HTML and text files) [] to declare a range of characters to match (e.g., example.[0-9] to match on example.0, example.1, …)
Navigation in Editor
Switch editors p 1/2/3:
CMD+1/2in
CMD+PQuick Open list, hit enter to open in current pane, hitCMD+\to open in next pane.Move active editor to left/right group:
CTRL+CMD+LEFT/RIGHTSwitching files inside on editor:
SHIFT+ALT+TAB
Editing
Show IntelliSense:
CTRL+SPACEFind by symbol (instead of find by text):
CMD+SHIFT+OWhen viewing JSON file, it'll find by the key.
When viewing HTML, it'll find by class or id.
File navigation:
:punch: Show list of files in one editor or go back and forth between files:
CTRL+TABCTRL+-to go back last fileto last position:
CMD+U
Code reformatting:
CMD+K, CMD+FCode folding:
SHIFT+CMD+[ or ]Trim trailing whitespace:
CMD+SHIFT+X
Multi-cursor:
In Insert mode, use
ALT/OPTION+ click to add multiple cursor, then pressESCto go to view mode.In Normal mode, use
CMD+Dto select multiple instances, then pressESCto go to view mode.In Insert mode, select lines and use
SHIFT+CMD+Lto turn lines into selections. (Require custom keyboard setup, see eblow)How to select all in file search result?
CMD+F-> type search word ->ALT + ENTER
Terminal: "ctrl+`"
Custom Hotkeys
Task
A task is shortcut to run external action (grunt, shell) without leaving your editor, such as build, test, etc.
To use, press CMD+P and type: task TASK_NAME.
Sample task:
Debug
You can press
F5to debug any single file.Link to doc
Packages
Monokai theme
Diff Tool
TSLint
TSLint
GitLens
Markdown All in One
Prettier
Quokka.js
SASS Formatter
TypeScrip[t Import Sorter]
Vim
Prettify JSON
Open Spec File
Code Formatting Setup
https://medium.com/@hamxiaoz/visual-studio-code-formatting-setup-9f40a95699ce
User Settings
Setup
How to add an "Open with VS Code" icon in Finder toolbar?
Go to my repo open-folder-with-vs-code and follow the instructions.
Last updated