12 Visual Studio Code Shortcuts For Faster Coding

Written by davis-dambis | Published 2020/03/14
Tech Story Tags: programming | shortcuts | vscode | visual-studio-code | coding | programming-tips | tutorial | helpdesk

TLDR There are some great tools and extensions that might help your coding experience enjoyable in the VS Code. That is great and all but there might be a chance you are missing out on some great shortcuts that VS code offers. This article is here to help you with some of the most useful shortcuts for faster coding.Here is the list of 12 Visual Studio Code Shortcuts: "Find Find Match" and "Move a line (Alt/Down Arrow keys) and "Navigate to a specific line"via the TL;DR App

There are some great tools and extensions that might help your coding experience enjoyable in the VS Code. That is great and all but there might be a chance you are missing out on some great shortcuts that VS code offers. That is why this article is here to help you with some of the most useful shortcuts for faster coding.
Here is the list of 12 Visual Studio Code Shortcuts: 

1. Add Selection To Next Find Match (Ctrl+D

This is one of my favorite shortcut. It will find matching text that you’ve highlighted and you can do whatever you want. For example, you have a list in HTML that you’ve made but you wish to change its class name but it might be tedious, but with CTRL+D you can make that tedious task an easy fix:
Or you can just copy over it:

1.1 Alternative to Ctrl+D (Ctrl+F2)
It does the same thing as Ctrl+D but instead will select all of them instantly without a need to press it repeatedly unlike with Ctrl+D. But be careful with this shortcut because if the selected word is somewhere else within the file then it will be overridden with whatever you decided to override it with: 

2. Search for a keyword throughout the project folder (Ctrl+Shift+F)

This is another powerful feature that can find specified keyword throughout all the files in your project folder and you can replace all the searched keywords as well:
Or you can specify which files or lines you want to exclude from replacement by clicking the dismiss on the file or line you wish not be changed:

3. Delete previous word (Ctrl+Backspace)

A handy one if you ever make a typo and just want to type it again:

4. Delete line (Ctrl+X)

If you want to delete a whole line then Ctrl+X can take care of that:

5. Select words (Ctrl+Shift+Arrow keys)

With Ctrl+Shift+Arrow keys you can select text word by word:

6. Jump to the beginning or end file (Ctrl+Home/Ctrl+End)

If you want to quickly jump to the beginning then Ctrl+Home or if you want to get to the end of file then Ctrl+End:

7. Move a line (Alt+Up/Down Arrow keys)

If you ever by mistake wrote code in the wrong line and want to move it to correct one without copy/pasting then Alt + Up/Down arrow keys will help:

8. Add cursor Up/Down (Ctrl+Alt+Up/Down Arrow keys)

If you ever find yourself in need to edit multiple lines with the same text use Ctrl+Alt+Up/Down and combined with Ctrl+Shift+Arrow left or right key can save you tons of time:

9. Duplicate a line above or below (Shift+Alt+Up/Down Arrow keys)

This shortcut simply duplicates a line on a new line either above or below:

10. Fold or unfold code (Ctrl+Shift+[ or ])

With Ctrl+Shift+[  to fold or Ctrl+Shift+] to unfold code: 

11. Navigate to a specific line (Ctrl+G)

To quickly navigate a specific line Ctrl+G of the selected file:

12. Column box selection (Shift+Alt+Cursor)

This will simply select text in a column box way:

Conclusion

This concludes the shortcut list. I hope these are helpful and will help you code a little faster and with less hassle.
You can find all the shortcuts here:

Written by davis-dambis | Up-And-Coming Full Stack Developer
Published by HackerNoon on 2020/03/14