- Multiple Cursors - To create multiple cursors in VS Code, hold down the
Alt
key and click in multiple places. This allows you to edit multiple lines at the same time. - Zen Mode - To enter Zen mode, press
Ctrl + K, Z
. This maximizes the editor window and hides all the UI elements except for the text editor. - Bracket Matching - Place the cursor on an opening or closing bracket and VS Code highlights the matching one.
- Command Palette - Press
Ctrl + Shift + P
to open the Command Palette, which lists all the available commands in VS Code. - Integrated Terminal - Open the integrated terminal by pressing
Ctrl + Shift + ~
. This allows you to run commands without leaving VS Code. - Split Editor - To split the editor window vertically or horizontally, press
Ctrl + \\
. - Emmet Abbreviations - Emmet is a powerful tool to write HTML and CSS code quickly. To use Emmet abbreviations, type the abbreviation and press
Tab
. - Quick Open - Press
Ctrl + P
to open the Quick Open panel, which allows you to quickly search for files in your project. - Code Folding - Use
Ctrl + Shift + [
to fold code blocks andCtrl + Shift + ]
to unfold them. - IntelliSense - VS Code's IntelliSense feature provides autocomplete suggestions, parameter hints, and other useful information while you are typing.
- Peek Definition - To see the definition of a symbol without leaving your current file, right-click on the symbol and select
Peek Definition
. - Go to Definition - To go to the definition of a symbol, press
F12
. - Code Snippets - VS Code comes with a set of built-in code snippets, which you can trigger by typing a shortcut and pressing
Tab
. - Code Formatting - To format your code, press
Shift + Alt + F
. - Extension Marketplace - The Extension Marketplace is where you can find and install extensions for VS Code. You can access it by clicking on the Extensions icon in the Activity Bar.
- Integrated Git - VS Code has built-in Git support, which allows you to manage your Git repositories without leaving the editor.
- Debugging - VS Code has a powerful debugging feature that allows you to debug your code right from the editor.
- Workspace Settings - You can configure VS Code settings on a per-workspace basis by creating a
.vscode/settings.json
file in your project folder. - Command Line Interface - You can open files and folders in VS Code from the command line by typing
code .
in the terminal. - Themes - VS Code comes with a set of built-in themes, and you can also install custom themes from the Extension Marketplace.
- Keybindings - You can customize VS Code keybindings by opening the Keyboard Shortcuts editor (
Ctrl + K, Ctrl + S
). - File Explorer - The File Explorer panel allows you to browse and manage your project files. You can open it by clicking on the Explorer icon in the Activity Bar.
- Search - To search for a string in your project, press
Ctrl + Shift + F
. - Live Share - VS Code's Live Share feature allows you to collaborate with other developers in real-time.
- Custom Snippets - You can create your own custom code snippets by opening the User Snippets editor (
Ctrl + Shift + P
and then typingPreferences: Configure User Snippets
).
25 VS Code Tips and Tricks
· 3 min read