The Command Palette is the keyboard way to accomplish just about any task that you would desire in Visual Studio Code. The benefits of knowing and using the Command Palette extensively are:
- Ease of use (one place for almost every action)
- Speed (keystrokes are faster than mouse clicks)
❗ Force yourself to rely heavily on the command palette and keyboard shortcuts. It'll feel "awkward" at first, but in no time you will be exponentially more productive when you become well-versed with the command palette and keyboard shortcuts
CTRL+SHIFT+P
View -> Command Palette...
💡 The best way to think about the command palette is that it uses a convention where the first "indicator" directs it to a subset of commands that are related
?
- shows the available subset entrance commands
>
- once you type this greater-than symbol you'll see all of the commands. Type partial command strings in to search through the available commands
<partial-file-name>
- start typing in the partial file name (including just an extension to get all files with the desired extension)
💡 Hold down
CTRL
while hittingENTER
to open the selected file in a new editor instead of replacing your currently-focused editor with the desired file
@[partial-symbol-name]
- with no partial symbol name, it'll display all of the symbols in the currently-focused file
@:[partial-symbol-name]
- (recommended) this sorts the symbols by the different categories (i.e. functions, variables, etc.)
❗ This is a super quick and easy way to go to a symbol in the current file instead of having to scroll and search with your eyes. Highly recommended!
:<line-number>
- moves cursor to the specified line number in the currently-focused editor
!
💡 Use the up and down arrow keys to select different errors or warnings to select and navigate to
git <command>
- allows you to currently checkout
or branch
>Git:
- brings up other git commands available
task [partial-task-name]
- without specifying a partial, it'll pull up all current tasks in the workspace
💡 Use the up and down arrow keys to select desired task and
ENTER
to run it
ext [partial-ext-name]
- list locally installed extensions (optionally with a search term)
ext install [partial-ext-name]
- search and install an extension
ext update
- update locally installed extensions