- intellisense
- blue suggestion: property
- purple suggestion: method
- Use the
ctrl + spacekey combination to force Intellisense to show up.
- When inside a method parentheses, press
ctrl+shift+spaceto trigger parameter hints. - Create a new file using the File Explorer. When typing the path, also include directories that do not exist and they will be created automatically, i.e
somewhere/cool/myfile.txt. - Open the command palette with
ctrl+p, then type an@symbol to move around the code quickly. - Use the
ctrl+lkey to select lines of code quickly. For more precise selections, useshift + ← ↑ → ↓to highlight individual characters. - Copy the line of code that you’re currently on by hitting
ctrl+corctrl+x. It will copy the entire line, no need to highlight it with the mouse. - To move a line somewhere nearby, simply use
alt + ← ↑to move the line. - To copy the same line of code over and over again, use
shift + alt + ← ↑ - Use the command palette for find the
Fold Allcommand. It will fold all the code in the document, then you can usectrl+shift+]to unfold the parts you’re working on. - Open VS Code settings with
ctrl+,, then enable Bracket Pair Colorization. It’s especially useful when using a curly brace langauge like JavaScript, C, Dart, etc. - Use
alt + clickto set multiple cursors at the same time. This can be much faster than copy/paste when the value the same in every location. - From the settings, enable the Linked Editing option. VS code will now automatically match any opening and closing tags for simultaneous edits.
- Find a symbol in your code that’s used multiple times, like a variable name. Put your cursor on the symbol and press
ctrl+d. It will find the next match and place an extra cursor on it, making name changes much faster. - Emmet cheat sheet: https://docs.emmet.io/cheat-sheet/
- Right click on a symbol and select Peek References. This will show all other files that reference the symbol. This is generally more efficient than doing a global find.
- First, find the original implementation of a function or variable. Next, right click on a symbol and select
Rename Symbol. This will rename the symbol and all references to it. - When you see the 💡 in VS code, it means you can take action on it. Click it or use the
ctrl + .shortcut to view the available actions.