Master VS Code in No Time with These 101 Essential Keyboard Shortcuts

Master VS Code in No Time with These 101 Essential Keyboard Shortcuts

Become a Productivity Ninja and Simplify Your Coding Workflow with VS Code

Visual Studio Code (VS Code) is a popular code editor that offers a wide range of features to make coding easier and more efficient. One of the best ways to improve your productivity in VS Code is by using keyboard shortcuts. In this blog post, we will provide you with 100 crucial keyboard shortcuts that will help you streamline your coding workflow and master VS Code.

General Shortcuts:-

  1. Ctrl+Shift+P – Open the Command Palette

  2. Ctrl+Shift+N – Open a new window

  3. Ctrl+Shift+W – Close the current window

  4. Ctrl+Shift+T – Reopen the closed tab

  5. Ctrl+Shift+F – Search across files

  6. Ctrl+` – Open the integrated terminal

  7. Ctrl+Shift+` – Create a new terminal

  8. Ctrl+Shift+X – Open the Extensions view

  9. Ctrl+Shift+G – Open the Source Control view

  10. Ctrl+Shift+D – Open the Debug view

  11. Ctrl+K Ctrl+S – Open the Keyboard Shortcuts view

  12. Ctrl+K Z – Open Zen Mode/ Double Esc to exit

Editing Shortcuts:-

  1. Ctrl+X – Cut line

  2. Ctrl+C – Copy line

  3. Ctrl+V – Paste line

  4. Ctrl+Shift+K – Delete line

  5. Ctrl+Enter – Insert the line below

  6. Ctrl+Shift+Enter – Insert line above

  7. Ctrl+D – Select the next occurrence of the current selection

  8. Ctrl+U – Undo the last cursor operation

  9. Ctrl+Shift+L – Select all occurrences of the current selection

  10. Ctrl+F – Find

  11. Ctrl+H – Replace

  12. Alt+Up/Down – Move the line up/down

  13. Alt+Shift+Up/Down – Copy line up/down

Navigation Shortcuts:-

  1. Ctrl+P – Quick Open

  2. Ctrl+Tab – Switch between open files

  3. Ctrl+G – Go to line

  4. Ctrl+Shift+O – Go to the symbol

  5. Ctrl+Shift+M – Show problems panel

  6. Ctrl+Shift+J – Toggle panel

Code Formatting Shortcuts:-

  1. Ctrl+K Ctrl+F – Format document

  2. Shift+Alt+F – Format selection

  3. Ctrl+K Ctrl+C – Add line comment

  4. Ctrl+K Ctrl+U – Remove line comment

  5. Shift+Alt+A – Toggle block comment

Debugging Shortcuts:-

  1. F5 – Start debugging

  2. F9 – Toggle breakpoint

  3. F10 – Step over

  4. F11 – Step into

  5. Shift+F11 – Step out

  6. Ctrl+K Ctrl+I – Show hover information

  7. Ctrl+Shift+F5 – Restart debugging session

Integrated Terminal Shortcuts:-

  1. Ctrl+Shift+T – Reopen closed terminal

  2. Ctrl+Home – Scroll to the top of the terminal

  3. Ctrl+End – Scroll to the bottom of the terminal

  4. Ctrl+Shift+Home – Select to top of the terminal

  5. Ctrl+Shift+End – Select to bottom of the terminal

  6. Ctrl+K Ctrl+C – Copy selection

  7. Ctrl+K Ctrl+V – Paste into the terminal

Git Shortcuts:-

  1. Ctrl+Shift+G – Open the Git view

  2. Ctrl+Enter – Stage changes

  3. Ctrl+Shift+Enter – Unstage changes

  4. Ctrl+Alt+C – Commit changes

  5. Ctrl+Shift+P then type git: create branch – Create a new branch

  6. Ctrl+Shift+P then type git: checkout branch – Switch to a different branch

  7. Ctrl+Shift+P then type git: clone – Clone a remote repository to your local machine

  8. Ctrl+Shift+P then type git: pull – Pull changes from the remote repository

  9. Ctrl+Shift+P then type git: push – Push changes to the remote repository

  10. Ctrl+Shift+P then type git: sync – Sync changes with the remote repository

  11. Ctrl+Shift+P then type git: blame – See who made changes to a specific line

Extension Shortcuts:-

  1. Ctrl+Shift+X – Open the Extensions view

  2. Ctrl+Shift+P then type ext install – Install an extension

  3. Ctrl+Shift+P then type ext uninstall – Uninstall an extension

  4. Ctrl+Shift+P then type ext update – Update an extension

  5. Ctrl+Shift+P then type ext list – List installed extensions

Workspace Shortcuts:-

  1. Ctrl+K Ctrl+O – Open workspace

  2. Ctrl+K Ctrl+W – Close workspace

  3. Ctrl+Shift+T – Reopen the closed tab in the workspace

  4. Ctrl+Shift+P then type workspace: add folder – Add a folder to the workspace

  5. Ctrl+Shift+P then type workspace: remove folder – Remove a folder from the workspace

Markdown Shortcuts:-

  1. Ctrl+Shift+V – Preview markdown

  2. Ctrl+B – Bold

  3. Ctrl+I – Italic

  4. Ctrl+K Ctrl+I – Insert image

  5. Ctrl+K Ctrl+L – Insert link

  6. Ctrl+K Ctrl+C – Insert code block

  7. Ctrl+K Ctrl+T – Insert table

JavaScript Shortcuts:-

  1. Ctrl+Space – Trigger suggestions

  2. Ctrl+Shift+Space – Trigger parameter hints

  3. Ctrl+Shift+O – Organize imports

  4. Ctrl+. – Quick fix suggestions

  5. F12 – Go to the definition

  6. Alt+F12 – Peek definition

HTML Shortcuts:-

  1. Ctrl+Space – Trigger suggestions

  2. Ctrl+Shift+Space – Trigger parameter hints

  3. F12 – Go to the definition

  4. Alt+F12 – Peek definition

  5. Ctrl+Shift+P then type emmet: wrap with the abbreviation – Wrap selected code with an abbreviation

CSS Shortcuts:-

  1. Ctrl+Space – Trigger suggestions

  2. Ctrl+Shift+Space – Trigger parameter hints

  3. F12 – Go to the definition

  4. Alt+F12 – Peek definition

  5. Ctrl+K Ctrl+X – Extract selection into a new rule

Python Shortcuts:-

  1. Ctrl+Space – Trigger suggestions

  2. Ctrl+Shift+Space – Trigger parameter hints

  3. Shift+F12 – Show references

  4. F12 – Go to the definition

  5. Alt+F12 – Peek definition

  6. Ctrl+Shift+P then type python: select interpreter – Select Python interpreter

  7. Ctrl+Shift+P then type python: run the current file – Run Python script

Conclusion

By using keyboard shortcuts in VS Code, you can greatly improve your coding workflow and increase your productivity. With these 100 crucial shortcuts, you can navigate, edit, debug, format, and work with different programming languages more efficiently. Take the time to learn and master these shortcuts to become a VS Code power user.

Did you find this article valuable?

Support Sandip Halder by becoming a sponsor. Any amount is appreciated!