Visual Studio Code shortcuts
vscode keyboard shortcuts for developers

Visual Studio Code (VS Code) has become one of the most popular editors used by programmer/developer due to it’s flexibility, powerful features, and wide range of extensions available in its marketplace. However, The very useful for the developer is the large number of keywords shortcuts that are available for free to use that significantly enhance productivity of software developer in IT field. Getting used to these shortcuts & mastering it can save your time in building any kind of application, reduce context switching, and keep your focus on your code.

In this article, Let’s explore 47 usefull Visual Studio Code shortcuts tricks that every developer should know. Whether you’re a beginner or an experienced user, these vscode keyboard shortcuts for developers surely help you in various things while coding for your projects.

General Shortcuts

  1. Command Palette: Ctrl + Shift + P or F1 – (Windows) | Cmd + Shift + P or F1 – (macOS)
  2. Quick Open: Ctrl + P – (Windows) | Cmd + P – (macOS)
  3. New Window: Ctrl + Shift + N – (Windows) | Cmd + Shift + N(macOS)
  4. Close Window: Ctrl + Shift + W – (Windows) | Cmd + Shift + W(macOS)
  5. Settings: Ctrl + , – (Windows) | Cmd + , – (macOS)
  6. User Preferences: Ctrl + Shift + , – (Windows) | Cmd + Shift + , – (macOS)
  7. Toggle Sidebar: Ctrl + B – (Windows)| Cmd + B – (macOS)
  8. Toggle Full Screen: F11 – (Windows)| Cmd + Ctrl + F – (macOS)
  9. Zen Mode: Ctrl + K Z – (Windows)| Cmd + K Z – (macOS)
  10. Toggle Terminal: Ctrl + (backtick) – (Windows) | Cmd + (backtick) – (macOS)

File Management

  1. New File: Ctrl + N | Cmd + N
  2. Open File: Ctrl + O | Cmd + O
  3. Save: Ctrl + S | Cmd + S
  4. Save As: Ctrl + Shift + S | Cmd + Shift + S
  5. Save All: Ctrl + K S | Cmd + Option + S
  6. Close Editor: Ctrl + W | Cmd + W
  7. Reopen Closed Editor: Ctrl + Shift + T | Cmd + Shift + T
  8. Close Folder: Ctrl + K F | Cmd + K F

Navigation

  1. Go to Line: Ctrl + G | Cmd + G
  2. Go to File: Ctrl + P | Cmd + P
  3. Go to Symbol: Ctrl + Shift + O | Cmd + Shift + O
  4. Go to Definition: F12 | F12
  5. Peek Definition: Alt + F12 | Option + F12
  6. Navigate Back: Alt + Left Arrow | Cmd + Left Arrow
  7. Navigate Forward: Alt + Right Arrow | Cmd + Right Arrow
  8. Toggle Breadcrumbs: Ctrl + Shift + . | Cmd + Shift + .

Editing

  1. Cut Line: Ctrl + X | Cmd + X
  2. Copy Line: Ctrl + C | Cmd + C
  3. Move Line Up/Down: Alt + Up/Down Arrow | Option + Up/Down Arrow
  4. Duplicate Line: Shift + Alt + Up/Down Arrow | Shift + Option + Up/Down Arrow
  5. Delete Line: Ctrl + Shift + K | Cmd + Shift + K
  6. Insert Line Below: Ctrl + Enter | Cmd + Enter
  7. Insert Line Above: Ctrl + Shift + Enter | Cmd + Shift + Enter
  8. Select Line: Ctrl + L | Cmd + L
  9. Select All Occurrences: Ctrl + Shift + L | Cmd + Shift + L
  10. Undo: Ctrl + Z | Cmd + Z
  11. Redo: Ctrl + Y | Cmd + Shift + Z
  12. Toggle Comment: Ctrl + / | Cmd + /
  13. Block Comment: Shift + Alt + A | Shift + Option + A
  14. Format Document: Shift + Alt + F | Shift + Option + F
  15. Format Selection: Ctrl + K Ctrl + F | Cmd + K Cmd + F

Search and Replace

  1. Find: Ctrl + F | Cmd + F
  2. Replace: Ctrl + H | Cmd + H
  3. Find Next: F3 | Cmd + G
  4. Find Previous: Shift + F3 | Cmd + Shift + G
  5. Toggle Case Sensitive: Alt + C | Cmd + Alt + C
  6. Toggle Regex: Alt + R | Cmd + Alt + R

Simple by using these shortcuts into your workflow will boost your coding speed, As you will be navigate & manipulate your program or code more efficiently, making the development process smoother and more enjoyable. Happy coding!