From the course: Visual Studio Code Productivity Tips

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Create custom keybindings for common commands

Create custom keybindings for common commands - Visual Studio Code Tutorial

From the course: Visual Studio Code Productivity Tips

Start my 1-month free trial

Create custom keybindings for common commands

- [Instructor] I'm a long time Visual Studio user, which means I've memorized a lot of command keystrokes that I use constantly when working in that IDE. VS Code has many of the same features as Visual Studio, but the keystroke mapping can be different. You might feel disoriented too having moved to VS Code from another editor. Fortunately, VS Code is customizable, so we can redefine the keyboard shortcuts. I'd like to format this document. So if I right click and look at the context menu, I see that format document is Shift plus Alt plus F. And you'll see this many places in VS Code, where it tells you what the keystroke is. Another place is in the command bar, so press F1 look at format document and see that it's Shift plus Alt plus F. You can also see things like adding a line comment is Control K plus Control C. For me coming from Visual Studio, when I format a document over there, I used to keystrokes Control K, Control D. So I want to remap VS code to those keystrokes. To do…

Contents