Visual Studio Code Guide

What are the minimum keyboard shortcuts required for VS code to be effective?

·

2 min read

Visual Studio Code Guide

Have you ever wondered what are VScode keyboard shortcuts you/others use most of the time? If you closely look into your daily activities, you will realize that most of the results you get with minimum effort. A similar observation was made by the economist Vilfredo Pareto, "80% of the results originate from 20% of the effort", called Pareto Principal. What are the minimum shortcuts required for VS code to be effective?

You may not find the exact 80/20 rule in practice but, somewhat close to it.

  • By fixing 20% of the bugs, Microsoft would have eliminated 80% of the related problems in the system.

  • According to COCOMO, 80% of the software code takes 20% of the allocated time. On the other hand, the complex part(20%) of the software takes 80% of the time.

I find that below mentioned Visual Studio Code keyboard shortcuts are the 20% of shortcuts I use for 80% of the coding work.


Editing

  1. ⌘X - cut a line

  2. ⌘C - copy a line

  3. ⇧⌘K - delete a line

  4. ⌘L - select the line

  5. ⇧⌘ Enter - Insert line above.

  6. ⇧⌥ up/down - copy current line to up/down

  7. ⌥ up\down - move the line up and down

  8. ⌘d - select a word

  9. ⌥ click - multi-cursor selection


Searching

  1. ⌥F12 - to peek at the definition

  2. ⌘F - find a word or a phrase in the current file

  3. ⌘⇧F - find a word or a phrase in the current project

  4. F2 - rename a replace the subsequent occurrence of the reference.

  5. ⌘D - find other instances of selected code

  6. ⌘P - find and go to file (quick open)


Formatting

  1. ⌘⌥[ - folding innermost code block

  2. ⌘⌥] - unfolding outermost code block

  3. ⇧⌥F - code formatting

  4. ⌥Z - toggle word wrap

  5. ⌘N - open a new tab

  6. ⌘W - close the current tab

  7. ⌘B - toggle visibility of the side panel

  8. ⌃` - toggle visibility of the integrated terminal

  9. ⌘2 - split the screen into two editor groups

  10. ⇧⌘T - reopen the recently closed editor

  11. ⌥⌘← and ⌥⌘→ - view the editor tab on the left/right


More shortcuts, you can find them here