As a beginner or advanced programmer, you must be familiar with the importance of using an efficient code editor for coding and development. VS Code editor is a popular choice for programmers worldwide due to its wide range of features and functionality. Despite the emergence of several new coding tools in the market, VS Code remains the go-to product for coding due to its ease of use and versatility.
To maximize your productivity and efficiency, mastering visual studio code keyboard shortcuts is essential. With the various VSCode keyboard shortcuts, you can easily navigate, edit, and debug your code in a short amount of time. In this article, we’ll be discussing the various VSCode hotkeys or Visual Studio Code (VS Code) shortcuts that can help you perform coding tasks faster and more effectively.
Alt + Click | Add cursor |
Ctrl + Alt + Up/Down | Add cursor above/below |
Ctrl + Shift + G | Add cursor to next find match |
Ctrl + Shift + Alt + G | Add cursor to previous find match |
Ctrl + Alt + Shift + Up/Down | Add cursor to previous/next line |
Ctrl + Shift + Alt + Left/Right | Add cursor to previous/next occurrence |
Ctrl + Shift + P, then type “add folder” | Add folder to workspace |
Ctrl + K, Ctrl + C | Add line comment |
Ctrl + Shift + + | Add parameter |
Alt + Enter | Add selection to last find match occurrence |
Ctrl + D | Add selection to next find match |
Ctrl + Shift + L | Add selection to next find match occurrence |
Ctrl + Shift + K | Add selection to previous find match occurrence |
F9 | Add/remove breakpoint |
Ctrl + Shift + P, then type “change case” | Change case of selected text |
Ctrl + K, then M | Change file language mode |
Ctrl + K, then Ctrl + M | Change language mode |
Ctrl + Shift + L | Change selected text to lowercase |
Ctrl + Shift + U | Change selected text to uppercase |
Ctrl + K, then Ctrl + W | Close all editors except active |
Ctrl + K, then W | Close all open editors except the active one |
Ctrl + Shift + W | Close current window |
Ctrl + Shift + W | Close terminal |
Ctrl + Enter | Commit |
Ctrl + K, then Ctrl + C | Commit changes |
Ctrl + C | Copy line (empty selection) |
Shift + Alt + Up/Down | Copy line up/down |
Ctrl + Shift + C | Copy selection |
Ctrl + N | Create new file |
Ctrl + Shift + P, then type “snippet” | Create new snippet |
Ctrl + Shift + ` | Create new terminal |
Ctrl + Shift + N | Create new window |
Ctrl + Alt + N | Create new workspace |
Ctrl + X | Cut line (empty selection) |
Ctrl + Backspace | Delete all left |
Ctrl + Delete | Delete all right |
Shift + F9 | Delete breakpoint |
Ctrl + Shift + K | Delete current line |
Ctrl + Shift + K | Delete line |
Ctrl + Shift + D | Duplicate line |
Shift + Alt + Down | Duplicate selection |
Ctrl + Shift + P, then type “keyboard shortcuts” | Edit keyboard shortcuts |
Ctrl + F9 | Enable/disable breakpoint |
Ctrl + K, then Z | Enter Zen mode |
Tab | Expand abbreviation |
Ctrl + Shift + X | Extensions |
Ctrl + Shift + . | Extract method |
Ctrl + Shift + , | Extract variable |
Ctrl + Shift + F | Find |
Ctrl + Shift + F | Find and replace text across all files in the current workspace |
Ctrl + F | Find and replace text in current file |
Ctrl + Shift + F | Find in files |
F3 | Find next |
Shift + F3 | Find previous |
Ctrl + Shift + F | Find/replace in workspace |
F6 | Focus next part of the UI |
Ctrl + Shift + Alt + Right/Left | Focus next/previous part of file |
Shift + F6 | Focus previous part of the UI |
Ctrl + K, then Ctrl + 0 | Fold all |
Ctrl + K, then Ctrl + 0 | Fold all blocks |
Ctrl + K, Ctrl + 0-9 | Fold/unfold all code blocks |
Alt + Shift + 1-9 | Fold/unfold code blocks |
Ctrl + Shift + I | Format document |
Ctrl + Shift + Alt + L | Format selected code using ESLint |
Ctrl + Shift + Alt + F | Format selected code using Prettier |
Ctrl + K, Ctrl + F | Format selection |
Alt + Shift + F | Format selection (with Prettier extension) |
Ctrl + Alt + F | Format the entire document |
Alt + Left/Right | Go back/forward |
Ctrl + Alt + Left/Right | Go back/forward in editor history |
F12 | Go to definition |
Ctrl + K, then Ctrl + Q | Go to last edit location |
Ctrl + G | Go to line |
Ctrl + Shift + P, then type “go to line in open file” | Go to line in open file |
Ctrl + G, then Ctrl + G | Go to line/column |
Ctrl + F2 | Go to next bookmark |
F4 | Go to next change |
F8 | Go to next problem |
Shift + F2 | Go to previous bookmark |
Shift + F4 | Go to previous change |
Shift + F8 | Go to previous problem |
Ctrl + Shift + O | Go to symbol |
Ctrl + Shift + O | Go to symbol in workspace |
Tab | Indent line or selection |
Ctrl + Shift + ]/[ | Indent/outdent line |
Ctrl + Shift + P, then type “insert snippet” | Insert a snippet |
Ctrl + Shift + Alt + ↓ | Insert cursor at end of each line selected |
Alt + Click | Insert cursor at the clicked location |
Ctrl + Shift + Enter | Insert line above |
Ctrl + Enter | Insert line below |
Ctrl + Alt + Click | Insert multiple cursors at the clicked locations |
Tab | Insert snippet |
Ctrl + Shift + P, then type “ext install” | Install extension |
Ctrl + Shift + J | Join lines |
F12 | Jump to definition |
Ctrl + Shift + | Jump to matching bracket |
Ctrl + Shift + L | Jump to next word highlight |
Alt + Left/Right | Jump to next/previous edit |
Ctrl + Right/Left | Jump to next/previous word |
Ctrl + Shift + P | Jump to previous word highlight |
Ctrl + K, then Ctrl + S | Keyboard shortcut editor |
Ctrl + Down/Up | Move cursor to next/previous blank line |
Alt + Up/Down | Move line or selection up/down |
Alt + Up/Down | Move line up/down |
Alt + Up/Down | Move selected lines up/down |
Ctrl + Shift + [ / ] | Move to previous/next terminal tab |
Ctrl + Shift + Tab | Navigate editor group history |
Ctrl + Shift + Backspace | Navigate to last edit location |
F8 | Navigate to next error or warning |
Ctrl + Shift + Space | Navigate to next parameter hint |
Ctrl + Shift + . | Navigate to next symbol highlight |
Shift + F8 | Navigate to previous error or warning |
Ctrl + Shift + Alt + Space | Navigate to previous parameter hint |
Ctrl + Shift + , | Navigate to previous symbol highlight |
Ctrl + K, then P | Open command palette |
Ctrl + Shift + D | Open Debug panel |
Alt + F12 | Open definition to the side |
Ctrl + Shift + X | Open extension panel |
Ctrl + O | Open file |
Ctrl + Shift + E | Open file explorer panel |
Ctrl + K, then Enter | Open file in new window |
Ctrl + Shift + G | Open Git panel |
Ctrl + Shift + F | Open global search |
Ctrl + Shift + T | Open integrated terminal |
Ctrl + Shift + C | Open integrated terminal to current file directory |
Ctrl + K, Ctrl + S | Open Keyboard Shortcuts editor |
Ctrl + Shift + E | Open last active file in explorer |
Ctrl + K, then V | Open markdown preview to the side |
Ctrl + Shift + N | Open new window |
Ctrl + Tab | Open next editor |
Ctrl + Shift + V | Open preview |
Ctrl + Shift + V | Open preview of Markdown file in the side panel |
Ctrl + K, then V | Open preview to side |
Ctrl + K, then V | Open preview to the side |
Ctrl + Shift + Tab | Open previous editor |
Ctrl + K, then Ctrl + O | Open recent file |
Ctrl + R, then Ctrl + R | Open recent workspace |
Alt + F12 | Open reference to the side |
Ctrl + , | Open settings |
Ctrl + Shift + P, then type “settings” | Open settings editor |
Ctrl + Shift + G | Open source control |
Ctrl + , | Open user settings |
Ctrl + K, then Ctrl + O | Open workspace |
Ctrl + ` | Open/close integrated terminal |
Shift + Tab | Outdent line or selection |
Ctrl + Shift + V | Paste from clipboard |
Ctrl + V | Paste line below |
Ctrl + Shift + F12 | Peek definition |
Ctrl + K, then F12 | Peek definition to the side |
Ctrl + Shift + V | Preview Markdown |
Ctrl + Shift + D | Pull |
Ctrl + Shift + Enter | Push |
Ctrl + K, then P | Push changes |
Ctrl + P | Quick open file |
Ctrl + . (period) | Quick-fix suggestion for errors |
Ctrl + Shift + . (period) | Quick-fix suggestion for warnings |
Ctrl + Shift + Y | Redo last action |
Ctrl + Shift + R | Refactor symbol |
Ctrl + Shift + F9 | Remove all breakpoints |
Ctrl + Shift + P, then type “remove folder” | Remove folder from workspace |
Ctrl + K, Ctrl + U | Remove line comment |
Ctrl + K, then Ctrl + U | Remove line comment on selected lines |
Ctrl + Shift + – | Remove parameter |
F2 | Rename symbol |
Ctrl + Shift + T | Reopen closed editor |
Ctrl + Shift + T | Reopen last closed terminal |
Ctrl + Shift + H | Replace all |
Ctrl + Shift + H | Replace all occurrences of a term in a file |
Ctrl + Shift + H | Replace all occurrences of selected text with a new value |
Ctrl + Shift + H | Replace in all files |
Ctrl + Shift + F5 | Restart debugging |
Ctrl + Shift + E, then Ctrl + Shift + F | Reveal active file in Explorer |
Ctrl + K, then Ctrl + B | Reveal in side bar |
Ctrl + Shift + S | Save all files |
Ctrl + K, then S | Save all open files |
Ctrl + K, then Ctrl + S | Save changes |
Ctrl + S | Save file |
Ctrl + K, then Ctrl + S | Save workspace |
Ctrl + ↑/↓ | Scroll line up/down without moving cursor |
Ctrl + Shift + Page Up/Down | Scroll terminal up/down |
Ctrl + Shift + F | Search in all files |
Ctrl + Shift + L | Select all occurrences of current selection |
Ctrl + F2 | Select all occurrences of current word |
Ctrl + Shift + L | Select all occurrences of the current selection |
Ctrl + D (with no selection) | Select current word |
Ctrl + L | Select line |
Ctrl + . | Select next suggestion |
Ctrl + , | Select previous suggestion |
Shift + Alt + Home/End | Select to beginning/end of document |
Ctrl + Shift + Home/End | Select to beginning/end of line |
Shift + Home/End | Select to beginning/end of terminal line |
Shift + Alt + Left/Right | Select to previous/next word |
Ctrl + K, Ctrl + F | Set language mode for current file |
Ctrl + Shift + P | Show all commands |
Ctrl + Shift + P, then type “emmet” | Show all Emmet commands |
Ctrl + K, then T | Show all file types |
Ctrl + Shift + P, then type “git” | Show all git commands |
Ctrl + Shift + P, then type “live share” | Show all Live Share commands |
Ctrl + Shift + P, then type “settings” | Show all settings commands |
Ctrl + Shift + O | Show all symbols |
Ctrl + K, then Ctrl + T | Show all symbols in workspace |
Ctrl + Shift + P, then type “terminal” | Show all terminal commands |
Ctrl + Shift + P | Show command palette |
Ctrl + Shift + E | Show Explorer |
Ctrl + K, Ctrl + I | Show hover information |
Ctrl + K, then P | Show markdown preview |
Ctrl + Shift + V | Show markdown preview to the side |
Ctrl + Shift + M | Show problems |
Ctrl + Shift + M | Show problems panel |
Ctrl + K, then R | Show recent files list |
Ctrl + K, then F12 | Show references |
Shift + F12 | Show references in Peek view |
Ctrl + Shift + F | Show Search |
Ctrl + K, then Ctrl + H | Show/hide explorer |
Ctrl + ` | Show/hide integrated terminal |
Ctrl + Alt + T | Show/hide integrated terminal tab |
Ctrl + Shift + U | Show/hide output panel |
Ctrl + J | Show/hide panel for debugging console |
Ctrl + Shift + M | Show/hide problems panel |
Ctrl + Shift + F | Show/hide replace panel |
Ctrl + Shift + E | Show/hide search panel |
Ctrl + ` | Show/hide terminal |
Ctrl + B | Show/hide the sidebar |
F9, then A | Sort lines alphabetically |
F9, then L | Sort lines by length |
Ctrl + | Split editor |
Ctrl + K, then S | Stage changes |
F5 | Start debugging |
F5 | Start debugging with breakpoints |
Ctrl + F5 | Start debugging without breakpoints |
F11 | Step into |
Ctrl + Shift + F11 | Step into targets |
Shift + F11 | Step out |
F10 | Step over |
Shift + F5 | Stop debugging |
Ctrl + Shift + F10 | Stop on entry |
Ctrl + Shift + { | Surround selected text with curly braces |
Ctrl + Shift + ( | Surround selected text with parentheses |
Ctrl + Shift + ‘ or “ | Surround selected text with single or double quotes |
Ctrl + Shift + [ | Surround selected text with square brackets |
Ctrl + Tab | Switch between open editors |
Ctrl + Shift + J | Switch to last active editor group |
Shift + Alt + A | Toggle block comment |
Shift + Alt + A | Toggle block comment on selected lines |
Ctrl + B | Toggle bold |
Ctrl + K, then Ctrl + H | Toggle breadcrumbs |
F9 | Toggle breakpoint |
Ctrl + / | Toggle comment on selected code Visual Code comment shortcut |
Ctrl + , then Ctrl + 1-9 | Toggle editor group layout |
Ctrl + Shift + E | Toggle file explorer |
Alt + C | Toggle find case sensitive |
Ctrl + Shift + L | Toggle find in selection |
Alt + W | Toggle find whole word |
F11 | Toggle full screen |
Ctrl + K, then H | Toggle hidden files in file explorer |
Ctrl + Shift + U | Toggle highlight search results |
Ctrl + ` | Toggle integrated terminal |
Ctrl + I | Toggle italic |
Ctrl + / | Toggle line comment |
Ctrl + K, then Ctrl + C | Toggle line comment on selected lines |
Ctrl + Shift + P, then type “toggle line numbers” | Toggle line numbers |
Ctrl + Shift + O | Toggle mark occurrences |
Ctrl + Shift + P, then type “toggle minimap” | Toggle minimap |
Ctrl + Shift + Alt | Toggle multi-cursor modifier key |
Ctrl + J | Toggle panel |
Ctrl + J, then Ctrl + Shift + Alt + Left/Right | Toggle panel position |
Alt + F12 | Toggle peek definition |
Ctrl + . | Toggle quick fix |
Ctrl + Shift + 8 | Toggle render whitespace |
Alt + R | Toggle search regex |
Ctrl + Shift + U | Toggle selected text between uppercase, lowercase, and title case |
Ctrl + B | Toggle side bar |
Ctrl + B | Toggle sidebar |
Ctrl + B | Toggle sidebar visibility |
Ctrl + Shift + 5 | Toggle strikethrough |
Ctrl + M | Toggle tab key moves focus |
Ctrl + ` | Toggle terminal |
Alt + Z | Toggle word wrap |
Ctrl + K, then Z | Toggle Zen Mode |
Ctrl + U | Transform to lowercase |
Ctrl + Shift + U | Transform to uppercase |
Ctrl + K, then Ctrl + X | Trim trailing whitespace |
Ctrl + K, Ctrl + X | Trim trailing whitespace from entire file |
Ctrl + K, then Ctrl + J | Unfold all |
Ctrl + K, then Ctrl + J | Unfold all blocks |
Ctrl + Shift + P, then type “ext update” | Update all extensions |
Ctrl + Shift + P, then type “update extensions” | Update extensions |
Ctrl + Shift + L | View git log |
Ctrl + E, then Ctrl + Enter | Wrap with abbreviation |