DEV Community

d
d

Posted on

VSCode Shortcuts

A good rule of thumb to being an efficient programmer is trying to be one with the tool you are using. For most people one of the most popular IDEs out there at the moment is VSCode.

In order to supercharge your VSCode usage here are some shortcuts that go a long way.

Image description
Photo by Mohammad Rahmani on Unsplash

Multiple cursors

In order to enable multiple cursors in VSCode, press ALT + SHIFT + up/down or OPTION + COMMAND + up/down on a MAC. This is especially useful for writing duplicated code such as switch statements for example.
multiple cursors
Image description

Go to a specific line

This works wonder when trying to fix linting errors or compiling errors. If the compiler tells you there is a problem in line 7, then hitting CTRL + p or CTRL + p, followed by ":" and the line number allows you to quickly head to that line.
Image description

Go to a file

This is similar to the one above, but instead of adding a colon at the end simply type the file name. CTRL + p or COMMAND + p followed by the file name that you would like.
Image description

Search through all files

If there is a term that you would like to find in all the files just to a CTRL + SHIFT + f or COMMAND + SHIFT + f
Image description

Search through current file

If there is a term that you would like to find in the current file just to a CTRL + f or COMMAND + f
Image description

Change next few occurences of the word

If there is a term that you would like to find in the current file just to a CTRL + d or COMMAND + d multiple times
Image description

Open README View

It can be difficult to read READMEs at times. Instead of reading the markdown directly try this instead. CTRL + k followed by v
Image description

The above article was originally published on https://parkerrobert.medium.com/vscode-shortcuts-57a145a7772f

Top comments (3)

Collapse
 
karenpayneoregon profile image
Karen Payne

Great article, one recommendation is to setup shortcuts like

CTRL + K

<kbd>CTRL</kbd> + <kbd>K</kbd>
Enter fullscreen mode Exit fullscreen mode
Collapse
 
parkerrobert profile image
d

Thanks for the advice, I've edited the article and it looks way more readable now

Collapse
 
karenpayneoregon profile image
Karen Payne

I agree.