DEV Community

Anthony DiPietrantonio
Anthony DiPietrantonio

Posted on

VS Code: 14 Keyboard Shortcuts to Increase Your Productivity

While customizing your VS Code with a nice (hopefully dark) theme and handy extensions can make the experience a whole lot better for you, I'm here to share a few of my most used keyboard shortcuts / tricks to hopefully make your stay in VS Code a little bit better, while also helping you increase your productivity.

The shortcut keys are specific to Mac, but they should be fairly similar on Windows.

Deleting

1. Delete One Word at a Time

OPTION + BACKSPACE

https://media.giphy.com/media/tjQRQGdMEykVouwqJY/giphy.gif

2. Delete Entire Line to Left of Cursor
COMMAND + BACKSPACE

https://media.giphy.com/media/dKPuoFGH4y5ldy5AC7/giphy.gif

Selecting

3. Select One Word at a Time

OPTION + SHIFT + LEFT ARROW -or- RIGHT ARROW

https://media.giphy.com/media/a8bGXAG7mVb0rtzhtU/giphy.gif

4. Select Everything to Left or Right of Cursor

COMMAND + SHIFT + LEFT ARROW -or- RIGHT ARROW

https://media.giphy.com/media/vXR5RgKf2KpBprXlPm/giphy.gif

5. Select Each Occurrence of a Word, One by One

COMMAND + D

https://media.giphy.com/media/wIiBhjnxpL6bnHljb0/giphy.gif

6. Select All Occurrences of a Word

COMMAND + SHIFT + L

https://media.giphy.com/media/Adixkk6DTpiVfMgIcu/giphy.gif

Multi-Cursor
(To exit any multi-cursor mode, just press ESCAPE)

7. Place Multiple Cursors in Editor

COMMAND + CLICK

https://media.giphy.com/media/m5doLhnmtzURrPhqZp/giphy.gif

8. Place Multiple Cursors Up and/or Down From Current Line

COMMAND + OPTION + UP ARROW -or- DOWN ARROW

https://media.giphy.com/media/1PfvXjpGAPJqhMtot6/giphy.gif

Moving Code
9. Move Line of Code (or selection of code) Up or Down

OPTION + UP ARROW -or- DOWN ARROW

https://media.giphy.com/media/aC5k8Rt7HGWSDSPTyk/giphy.gif

Pasting
10. Copy n Items To Paste n Items

COMMAND + DOUBLE CLICK (to select), then COMMAND + C to copy,
then COMMAND + DOUBLE CLICK (to select), then COMMAND + V to paste

https://media.giphy.com/media/hcaFyEMlrYDMMNdGgl/giphy.gif

Navigation

11. Quickly Change Tabs

COMMAND + OPTION + LEFT ARROW -or- RIGHT ARROW

https://media.giphy.com/media/GApYH2Y6fBO50vfPqu/giphy.gif

12. Show/Hide Sidbar

COMMAND + B

https://media.giphy.com/media/4g8lrI5py1kZPcD2Zq/giphy.gif

13. Show/Hide Explorer/Files

COMMAND + SHIFT + E

https://media.giphy.com/media/EryjWht255O9NP1ypn/giphy.gif

14. Show/Hide Extensions

COMMAND + SHIFT + X

https://media.giphy.com/media/4vegtnJWwrsab1xYZd/giphy.gif

And thats that! Hopefully this list introduced you to something that you can incorporate into your daily use of VS Code to increase your productivity.

As always, refer to the docs for more info:
VS Code Shortcut Guide

Feel free to reach out here or on my socials for any questions, suggestions, or to say hello 👋

Top comments (0)