DEV Community

KenjiGoh
KenjiGoh

Posted on • Edited on

5 2

VS Code Shortcut Keys

Save time, because time is more important than money.
List is non-exhaustive, will add more along the way.

Default Shortcut Keys

Open Terminal for the current working file

Ctrl + `
Enter fullscreen mode Exit fullscreen mode

Split work screen

Ctrl + \
Enter fullscreen mode Exit fullscreen mode

Close Current work screen

Ctrl + W
Enter fullscreen mode Exit fullscreen mode

Collapse Explorer side bar

Ctrl + B
Enter fullscreen mode Exit fullscreen mode

Alternate between 2 work screens

Alt + 1 and Alt + 2
Enter fullscreen mode Exit fullscreen mode

Search files

Ctrl + P
Enter fullscreen mode Exit fullscreen mode

Swap line of codes

Alt + up or down key
Enter fullscreen mode Exit fullscreen mode

To edit same lines at one go

Ctrl + alt + up or down key
Enter fullscreen mode Exit fullscreen mode

Image description

Configure Global Snippets

Go File > Preferences > User Snippets > Global Snippets

  "console.log": {
    "scope": "javascript,typescript",
    "prefix": "cl",
    "body": ["console.log('');"],
    "description": "Log output to console"
  }
Enter fullscreen mode Exit fullscreen mode

Prevent auto conversion of single-quote to double-quotes

Go File>Preferences>Settings and search for prettier.singleQuote. Now check to true.
Image description

Cheers!

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay