9 VS Code Shortcuts for Faster Programming
Tags: productivity, webdev, vscode
Published: 2020-11-20 12:27:33

---
canonical_url: https://chrisko.io/posts/vs-code-shortcuts-for-faster-programming
---
Writing code is probably _the_ most complex task in the world, it requires physical engagement, focus, a clear and undisturbed mind in order to fully immerse oneself in the process. Switching frequently between keyboard and mouse can be quite exhausting and kill your fluent process over and over again.

Soo, I made a small list of VS Code shortcuts helping to keep up the positive flow while coding - hands on the keyboard! :+1:

## 1. Show all Commands - and search for Commands

> Shortcut: _Ctrl+Shift+P_ or _F1_

Most frequently used by me for quickly opening (another) integrated terminal in VS Code. You can see from the image that it's useful to open up the settings, start a debug session or run npm scripts directly ... and much, much more!

<p align="center">
<img src="https://chrisko.io/images/vs-code-shortcuts-for-faster-programming/ShowAllCommands.png" alt="Show All Commands in VS Code" width="90%" />
</p>

## 2. Search text in your whole project

> Shortcut: _Ctrl+Shift+F_

This is my favorite shortcut for finding any text throughout my whole project. Sometimes, I have only some keywords in mind thinking hard where I could find those inside my codebase. It saved me a bunch of time already, because I don't have to search _manually_ anymore! Imagine you notice a typo on your own website, but you didn't remember _where exactly_ the text has been written. Aaaaaand.... voila! Ctrl+Shift+F comes to the rescue!

## 3. Search files by name

> Shortcut: _Ctrl+E_

This shortcut is similar to the one above except it searches the project only by file _name_, not the whole content of each file. It's even more powerful when the project adapted a special naming convention for all files depending on their purpose. Hit _enter_ to open the file.

## 4. Go to symbol

> Shortcut: _Ctrl+Shift+O_

This shortcut opens the prompt adding _@_ to the beginning. It allows you to search for symbols ocurring in the file currently displayed. It also shows you a list of all symbols in the file.

<p align="center">
<img src="https://chrisko.io/images/vs-code-shortcuts-for-faster-programming/GoToSymbol.png" alt="Go to Symbol in VS Code" width="90%" />
</p>

## 5. Switch editor tab

> Shortcut: _Ctrl+Tab_

Of course, your VS Code is massively full of open editor tabs, so switching between them quickly can be quite a time-saver! The ultimate rule is to _never ever touch your mouse!_ With _Ctrl+Tab_ you can throw your mouse out... just kidding! At the end of the demo below you get a glimpse of the next handy shortcut.

<p align="center">
<img src="https://chrisko.io/images/vs-code-shortcuts-for-faster-programming/TabDemo.gif" alt="Switch editer tabs in VS Code" width="90%" />
</p>

## 6. Split editor

> Shortcut: _Ctrl+^_

When having multiple editors open you eventually want to inspect and/or work on two (..or more) files at once. Sometimes for comparison or sometimes for a quick reference!

## 7. Select expressions

> Shortcut: _Ctrl+Shift+ Arrow Keys_

Okay, that's a handy one, but it's not really a feature of VS Code itself, but common in all text editors. Plus, everyone has to figure out if they like it. When your inside your code, and quickly want to select a some expressions or one or two lines, you can _navigate the cursor with Ctrl+Shift Arrow Keys_ jumping over single words or up and down the lines. Practicing for some days helps to master the art of writing code without touching the mouse!

Quick hint: Try playing around with _Ctrl+Shift_ or simply _Ctrl only_. Not holding _Shift_ won't select anything, but rather makes the cursor jump through the text.

## 8. Delete line

> Shortcut: _Ctrl+X_

If you want to quickly remove a line of code..

## 9. Duplicate your cursor

> Shortcut: _Ctrl+Alt+ Arrow Up / Down_

Duplicating the cursor sounds like the strongest superpower of an imaginary Dev-Superhero! You'll notice it's quite handy from time to time. Plus, its a lot of **fun**!

<p align="center">
<img src="https://chrisko.io/images/vs-code-shortcuts-for-faster-programming/DuplicateCursorDemo.gif" alt="Duplicate Cursors in VS Code" width="90%" />
</p>

That's it for now, thank you for reading through the end! :tada:

Happy coding!

P.S. I'm still trying to get my 'reached for the mouse'-counter down..But it's tough, though! Let me hear about how you're getting on with that. :heart: