Keyboard Shortcuts in VS Code by Teddie Mam
In this section, we will explore the most commonly used keyboard shortcuts in VS Code.
Step 1: Opening the Keyboard Shortcuts
To open the Keyboard Shortcuts settings, follow these steps:
- Press
Ctrl + K
followed byCtrl + S
to open the Keyboard Shortcuts editor. - Alternatively, you can click on the menu item File → Preferences → Keyboard Shortcuts.
![Keyboard Shortcuts GIF](imgs/shortcuts.gif)
Step 2: Searching for a Shortcut
To search for a specific shortcut, do the following:
- Type your desired shortcut or action in the search box at the top of the Keyboard Shortcuts editor.
- VS Code will filter the list based on your input, making it easier to find the shortcut you're looking for.
Step 3: Modifying a Shortcut
If you want to modify an existing shortcut, follow these steps:
- Locate the shortcut you want to change in the Keyboard Shortcuts editor.
- Click on the pencil icon (Edit this keybinding) next to the shortcut.
- Enter your desired keyboard combination for the shortcut.
- Press
Enter
to save the changes.
Fun Fact: Zen Mode
Zen mode is a distraction-free view, allowing you to focus completely on your code and hide all the toolbars and buttons. You can activate Zen mode with the shortcut: Ctrl+K Z (or Cmd+K Z on Mac), or by going to View > Appearance > Toggle Zen Mode.
For more information and a complete list of keyboard shortcuts, you can refer to the official VS Code documentation on keyboard shortcuts.