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:-
Ctrl+Shift+P – Open the Command Palette
Ctrl+Shift+N – Open a new window
Ctrl+Shift+W – Close the current window
Ctrl+Shift+T – Reopen the closed tab
Ctrl+Shift+F – Search across files
Ctrl+` – Open the integrated terminal
Ctrl+Shift+` – Create a new terminal
Ctrl+Shift+X – Open the Extensions view
Ctrl+Shift+G – Open the Source Control view
Ctrl+Shift+D – Open the Debug view
Ctrl+K Ctrl+S – Open the Keyboard Shortcuts view
Ctrl+K Z – Open Zen Mode/ Double Esc to exit
Editing Shortcuts:-
Ctrl+X – Cut line
Ctrl+C – Copy line
Ctrl+V – Paste line
Ctrl+Shift+K – Delete line
Ctrl+Enter – Insert the line below
Ctrl+Shift+Enter – Insert line above
Ctrl+D – Select the next occurrence of the current selection
Ctrl+U – Undo the last cursor operation
Ctrl+Shift+L – Select all occurrences of the current selection
Ctrl+F – Find
Ctrl+H – Replace
Alt+Up/Down – Move the line up/down
Alt+Shift+Up/Down – Copy line up/down
Navigation Shortcuts:-
Ctrl+P – Quick Open
Ctrl+Tab – Switch between open files
Ctrl+G – Go to line
Ctrl+Shift+O – Go to the symbol
Ctrl+Shift+M – Show problems panel
Ctrl+Shift+J – Toggle panel
Code Formatting Shortcuts:-
Ctrl+K Ctrl+F – Format document
Shift+Alt+F – Format selection
Ctrl+K Ctrl+C – Add line comment
Ctrl+K Ctrl+U – Remove line comment
Shift+Alt+A – Toggle block comment
Debugging Shortcuts:-
F5 – Start debugging
F9 – Toggle breakpoint
F10 – Step over
F11 – Step into
Shift+F11 – Step out
Ctrl+K Ctrl+I – Show hover information
Ctrl+Shift+F5 – Restart debugging session
Integrated Terminal Shortcuts:-
Ctrl+Shift+T – Reopen closed terminal
Ctrl+Home – Scroll to the top of the terminal
Ctrl+End – Scroll to the bottom of the terminal
Ctrl+Shift+Home – Select to top of the terminal
Ctrl+Shift+End – Select to bottom of the terminal
Ctrl+K Ctrl+C – Copy selection
Ctrl+K Ctrl+V – Paste into the terminal
Git Shortcuts:-
Ctrl+Shift+G – Open the Git view
Ctrl+Enter – Stage changes
Ctrl+Shift+Enter – Unstage changes
Ctrl+Alt+C – Commit changes
Ctrl+Shift+P then type git: create branch – Create a new branch
Ctrl+Shift+P then type git: checkout branch – Switch to a different branch
Ctrl+Shift+P then type git: clone – Clone a remote repository to your local machine
Ctrl+Shift+P then type git: pull – Pull changes from the remote repository
Ctrl+Shift+P then type git: push – Push changes to the remote repository
Ctrl+Shift+P then type git: sync – Sync changes with the remote repository
Ctrl+Shift+P then type git: blame – See who made changes to a specific line
Extension Shortcuts:-
Ctrl+Shift+X – Open the Extensions view
Ctrl+Shift+P then type ext install – Install an extension
Ctrl+Shift+P then type ext uninstall – Uninstall an extension
Ctrl+Shift+P then type ext update – Update an extension
Ctrl+Shift+P then type ext list – List installed extensions
Workspace Shortcuts:-
Ctrl+K Ctrl+O – Open workspace
Ctrl+K Ctrl+W – Close workspace
Ctrl+Shift+T – Reopen the closed tab in the workspace
Ctrl+Shift+P then type workspace: add folder – Add a folder to the workspace
Ctrl+Shift+P then type workspace: remove folder – Remove a folder from the workspace
Markdown Shortcuts:-
Ctrl+Shift+V – Preview markdown
Ctrl+B – Bold
Ctrl+I – Italic
Ctrl+K Ctrl+I – Insert image
Ctrl+K Ctrl+L – Insert link
Ctrl+K Ctrl+C – Insert code block
Ctrl+K Ctrl+T – Insert table
JavaScript Shortcuts:-
Ctrl+Space – Trigger suggestions
Ctrl+Shift+Space – Trigger parameter hints
Ctrl+Shift+O – Organize imports
Ctrl+. – Quick fix suggestions
F12 – Go to the definition
Alt+F12 – Peek definition
HTML Shortcuts:-
Ctrl+Space – Trigger suggestions
Ctrl+Shift+Space – Trigger parameter hints
F12 – Go to the definition
Alt+F12 – Peek definition
Ctrl+Shift+P then type emmet: wrap with the abbreviation – Wrap selected code with an abbreviation
CSS Shortcuts:-
Ctrl+Space – Trigger suggestions
Ctrl+Shift+Space – Trigger parameter hints
F12 – Go to the definition
Alt+F12 – Peek definition
Ctrl+K Ctrl+X – Extract selection into a new rule
Python Shortcuts:-
Ctrl+Space – Trigger suggestions
Ctrl+Shift+Space – Trigger parameter hints
Shift+F12 – Show references
F12 – Go to the definition
Alt+F12 – Peek definition
Ctrl+Shift+P then type python: select interpreter – Select Python interpreter
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.