

Ctrl + Shift + P ii.) Create a new window/instance The command palette is quite useful, for say, when an individual who is on the lookout for a typical command in VS code, but does not remember the command. We can look for alternative commands in the command palette by pressing this shortcut. The fundamental shortcuts i.) Display command palette TL DR: The complete blog can be viewed here in a shortened version.ġ. A list of the most frequently used VS code Linux keyboard shortcuts has been compiled to help you save time. It can also be annoying to have to repeatedly type the same commands, each slightly different.ĭespite this, Linux proffers a substantial array of keyboard shortcuts and history functions that makes it simple to work with the VS code productively.
#Vs code shortcuts cheat sheet how to
It may be difficult for beginners to grasp how to use the VS code, especially since you have to use your arrow keys to navigate. Every user of the VS code should be familiar with some Linux keyboard shortcuts.Īlmost every Linux user is familiar with the Bourne Again SHell (Bash) since it is the pre-configured shell in most distributions. There is no exception to this rule when it comes to Linux shortcuts. Consider this for a moment.ĭo you think it is okay if someone repeatedly selects text by dragging through the mouse and selecting the cut option from the menu for once instead of pressing Ctrl+X? or by holding down the mouse button to copy the entire text instead of pressing Ctrl+A? Published: 7th January 2019 by Andreas Müller on dev.It is possible to become more efficacious and proficient with any tool when you know how to use shortcuts. I maintain a repository on GitHub where I collect commands I tend to forget - check it out if you want.Įdited: 7th January 2019 (add MacOS shortcuts) This way you don’t have to switch to the mouse to open a preview.
#Vs code shortcuts cheat sheet windows
CTRL+ K V = Open Markdown preview to the side Windows If only one file at a time isn’t enough for you. CTRL+ SHIFT+ H = Replace in files Windows In case you want to perform some actions out of your systems file manager instead of using VS Code. CTRL+ K R = Reveal active file in Explorer Windows This is especially useful for multi-line selections. CTRL+ K CTRL+ X = Trim trailing whitespace Windows F2 = Rename symbol WindowsĪn indispensable shortcut for refactoring code. This just shows the corresponding definition of a variable or function without moving the cursor. The quick way to jump to the definition of a variable or function. In case you only want to format some parts of a file. CTRL+ K CTRL+ F = Format selection Windows

SHIFT+ ALT+ F = Format document Windowsīecause nobody wants to format a whole file manually. In case you don’t remember parameter order and don’t want to interrupt your flow by looking into the docs. CTRL+ SHIFT+ SPACE = Trigger parameter hints Windows Instead, just place the cursor on the word that you would like to select all occurrences of. With this, you don’t have to select something anymore. CTRL+ F2 = Select all occurrences of current word Windows This shortcut really saves time because you don’t have to CTRL+ D through a whole file. CTRL+ SHIFT+ L = Select all occurrences of current selection Windows Use this to search for identical lines in combination with the next shortcut. This is useful for a quick creation of multiple cursors in a selected area. SHIFT+ ALT+ I = Insert cursor at the end of each line selected Windows The fastest way to switch already open files without using the mouse. You can also go to previous errors or warnings using SHIFT+ F8. The fastest way to switch files (especially when they are not already open) without using the mouse. ALT+ Z = Toggle word wrap WindowsĪ handy little helper when you quickly want to see complete lines without scrolling horizontally. Note that this will kill your current terminal session if you had a terminal open in your VS Code workspace. This opens a list of your recent workspaces and is a super-fast way to switch to another folder or project. There is also a Windows Cheat-Sheet and MacOS Cheat-Sheet available to download. This is the complete list of shortcuts in VS Code. This is how you would open them directly. Once in a while, I need to adjust my user preferences. I use VS Code on Windows in the GIFs, but I also provide a table showing the shortcut for each command in both Windows and Mac. I made some GIFs for visualization to better remember them.Įvery command in VS Code can also be executed via command prompt with CTRL+ SHIFT+ P and a search query however, knowing the direct shortcut might be faster. Despite the many shortcuts that I use frequently in VS Code, the shortcuts I mention below can come in handy, but I often forget that they even exist.
