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
2. Delete Entire Line to Left of Cursor
COMMAND + BACKSPACE
Selecting
3. Select One Word at a Time
OPTION + SHIFT + LEFT ARROW -or- RIGHT ARROW
4. Select Everything to Left or Right of Cursor
COMMAND + SHIFT + LEFT ARROW -or- RIGHT ARROW
5. Select Each Occurrence of a Word, One by One
COMMAND + D
6. Select All Occurrences of a Word
COMMAND + SHIFT + L
Multi-Cursor
(To exit any multi-cursor mode, just press ESCAPE)
7. Place Multiple Cursors in Editor
COMMAND + CLICK
8. Place Multiple Cursors Up and/or Down From Current Line
COMMAND + OPTION + UP ARROW -or- DOWN ARROW
Moving Code
9. Move Line of Code (or selection of code) Up or Down
OPTION + UP ARROW -or- DOWN ARROW
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
Navigation
11. Quickly Change Tabs
COMMAND + OPTION + LEFT ARROW -or- RIGHT ARROW
12. Show/Hide Sidbar
COMMAND + B
13. Show/Hide Explorer/Files
COMMAND + SHIFT + E
14. Show/Hide Extensions
COMMAND + SHIFT + X
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)