CodeNewbie Community 🌱

Pauline
Pauline

Posted on • Originally published at dev.to on

20 VS Code shortcuts to speed up your flow ⚑️

In this article I want to share some of my favourite and most used VS Code shortcuts that help me save time, make my life a little easier and, as a heavy keyboard user, also allow me to stay in my developer flow.

You may be familiar with some of them already but hopefully you will discover a new shortcut that you can introduce into your workflow starting right now. 🀞🏻

I jotted down the key combinations for Mac users. If you’re a Windows or Linux user, you can find the key bindings for your OS here.

Alright then, so without needing to select the entire line first... (simply place your cursor anywhere on the line you want to edit)

  • ⌘X - cut a line
  • ⌘C- copy a line
  • β‡§βŒ˜K - delete a line
  • ⌘L - select the line

And while your cursor is on a specific line..

  • ⌘Enter - insert a new line below it
  • β‡§βŒ˜Enter - insert a new line above it
  • βŒ₯↑ and βŒ₯↓ - move the line up/down
  • ⇧βŒ₯↑ and ⇧βŒ₯↓ - duplicate line on the line above/below it
  • ⌘] and ⌘[ - indent and outdent the line
  • ⌘/ - (un)comment out the line

Or within a specific file..

  • ⌘D - find other instances of selected code
  • βŒ₯Z - toggle word wrap

Lastly, for some editor/window management..

  • ⌘P - find and go to file (quick open)
  • ⌘N - new editor
  • ⌘W - close editor
  • ⌘B - toggle visibility of the side panel
  • βŒƒ` - toggle visibility of the integrated terminal
  • ⌘2 - split screen into two editor groups
  • β‡§βŒ˜T - reopen recently closed editor
  • βŒ₯βŒ˜β† and βŒ₯βŒ˜β†’ - view editor tab on the left/right

What are some shortcuts you use frequently and which are not listed here? I'd love to hear from you!

Happy coding!

Top comments (0)