DEV Community

Cover image for 25 Vs Code shortcuts to improve your workflow (Mac)
Kachi Cheong
Kachi Cheong

Posted on

25 Vs Code shortcuts to improve your workflow (Mac)

VS code is one of the most popular text editors across all coding languages. It's fast, has a great community around it with amazing extensions and most importantly it's free. However less experienced programmers don't make full use of its capabilities.

When calling friends or family, do you dial their number every time you call them? Of course you don't, because you have their number stored as contact. VS code provides these same shortcuts but less experienced programmers do not utilize them effectively. The most efficient coders only take their hands off the keyboard whilst coding until it's necessary.

There is often a "I'll do it later" attitude when it comes to learning shortcuts. An hours now will improve your workflow moving forward and save you hours or even days in the long run.

Here is a list of 25 useful shortcuts for VS code:

Shortcut Task
⌘O Open file
⌘S Save file
⌥⌘S Save all files
⌥Z Toggle word wrap
⌥⌘← or ⌥⌘→ Toggle to next tab
⌘F Find
⇧⌘F Replace in files
⌘C Copy selection (copies line if nothing selected)
⌘V Paste selection
⇧⌘↑ or ⇧⌘↓ Insert duplicate line above or below
⇧⌘K Delete Line
⌘⌫ Clear line
⌘Z Undo Change
⇧⌘Z Revert Change
⌘/ Comment/uncomment line
⌘ + hover Check origin of usage
⇧⌘\ Jump to matching bracket
⌥⌘↑ or ⌥⌘↓ Add cursor to line above or below
⌥↑ or ⌥↓ Move line up or down a row
⌥← or ⌥→ Go to start/end of cursor word then continue to next start/end
⌘ + direction Go to end of direction
⇧⌘← or ⇧⌘→ Select remaining text from cursor
⇧⌥F Format document (formatter extension required)
fn + E Add emoji
⌘. Quick Fix

Discussion (1)

Collapse
andrewbaisden profile image
Andrew Baisden

I use ⇧⌘P the most.