VSCode Ultimate Keyboard Shortcuts Cheatsheet


Visual Studio Code has become one of the most popular, if not the most popular, text editors for developers and power users. It comes packed with features shortcuts, extensions and more to cater to every developer caliber. However, like most tools, it is only as powerful as the user. This VSCode ultimate keyboard shortcuts cheatsheet will provide the most common and useful shortcuts to turn you into a Visual Studio Code power user.

Note: If you are using macOS:

  • CTRL is equivalent to the key
  • SHIFT is equivalent to the key.
  • ALT is equivalent to the key.

Managing Files

The following are some VSCode keyboard shortcuts you can use when working with various files in the editor.

Key BindingFunctionality
CTRL + OOpens a file from the file system
CTRL + NCreates a new file
CTRL + SSaves the current file
CTRL + SHIFT + SEnables Save As mode, which allows you to define an extension or rename a file
CTRL + K then SSave All: Start by pressing CTRL + K to enable key binding mode. Then Press S to Save All.
CTRL + F4Close the current open file, saving the changes
CTRL + K CTRL + WClose all open files simultaneously, saving the changes
CTRL + SHIFT + TReopen closed editor window
CTRL + K ROpen the file location of the active file in the file system
CTRL + K PCopy the full path of the active file
CTRL + SHIFT + FShow the search window

Managing the editor

The following are some VSCode keyboard shortcuts to manage the editor.

Key BindingFunctionality
CTRL + \Split the editor by adding one extra editing window
CTRL + WClose the current editor window
CTRL + K FClose the currently opened folder and default to the main window.

Editing Files

When editing files, you use the following shortcuts to make your life easier.

Key BindingFunctionality
CTRL + CCopy the current line if section is highlighted
CTRL + XCut the current line if no section is highlighted
CTRL + FSearch in the current file
CTRL + HReplace entity in the current file
CTRL + LSelect the current line
F3Find next
SHIFT + F3Find previous
CTRL + SHIFT + KDelete the current line without highlight
CTRL + UUndo the most recent cursor operation
ALT + Up Arrow / Down ArrowMove the current line up or down from the current position
CTRL + EndGo to the end of a file
CTRL + HomeGo the beginning of the file
ALT + RETURNSelect all occurrences of the found matches
CTRL + /Comment or uncomment out the current line if no section is highlighted
CTRL + ReturnInsert a new line below the current line
CTRL + SHIFT + \Go to the matching bracket
CTRL + ]Automatically indent the current line if no section is highlighted
CTRL + [Automatically outdent the current line if no section is highlighted.
CTRL + SHIFT + ]Uncollapse a specific region.
CTRL + SHIFT + [Collapse a region
CTRL + ALT + FFormat the current document
CTRL + K CTRL + FFormat the selected section
CTRL + SHIFT + HReplace in Files
CTRL + .Show Quick Fix actions, if one is available
CTRL + K MAlter the current file language and set to auto-detect by default
CTRL + SPACEManually activate a code suggestion
ALT + Mouse ClickInsert a cursor

General Usage

The following VSCode keyboard shortcuts can be used to navigate the main editor.

Key BindingFunctionality
CTRL + SHIFT + PLaunch the Command Palette
CTRL + ,Open the user settings
CTRL + K CTRL + SLaunch Keyboard shortcut interface.
CTRL + SHIFT + NOpen a new window
CTRL + SHIFT + WClose the window
CTRL + Mouse ClickOpen the link on the default browser

Navigating VSCode

To quickly navigate through your files, use the following VSCode keyboard shortcuts.

Key BindingFunctionality
CTRL + TQuickly toggle all symbols
CTRL + PGo to a specific file or use the > to launch the command palette
CTRL + SHIFT + ONavigate to a specific symbol
F11Enable full screen mode
CTRL + SHIFT + EToggle Explorer/Editor Focus
CTRL + SHIFT + XShow/Search Visual studio extensions
CTRL + SHIFT + DShow the Debug panel
CTRL + =/Adjust zoom level


Visual Studio Code comes with an integrated terminal environment. You can use the following keyboard shortcuts to navigate it.

Key BindingFunctionality
CTRL + `Open a new terminal session
CTRL + CCopy the highlighted section
CTRL + VPaste into the active terminal session
CTRL + Up ArrowScroll Up in the active terminal
CTRL + Down ArrowScroll down active terminal
CTRL + HomeNavigate to top
CTRL + EndScroll to bottom

Final Words

In this VSCode keyboard shortcuts cheatsheet, we provided popular and useful shortcuts for the Visual Studio Code editor. It is good to note that the above are only highlights of the most useful shortcuts. You can view all other keyboard bindings using the CTRL + K CTRL + S shortcut.

John Wachira

John is a technical writer at MTE, when is not busy writing tech tutorials, he is staring at the screen trying to debug code.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox