This posts lists frequently encountered keyboard shortcut in Visual Studio Code.
- List methods
There is the workbench.action.gotoSymbol command. On Windows and Linux it’s set to CTRL+Shift+O by default. - Open symbol by name
Ctrl+T
- Disable minimap
"editor.minimap.enabled": false
- Navigate back and forth to cursor position
Alt
+←
Navigate backAlt
+→
Navigate forward - Open Command Palette
Ctrl + Shift + P
- Search for files
Ctrl
+p
orCtrl
+e
- Convert tabs to spaces and vice versa in an existing file
To convert non-leading tabs to spaces (or vice versa) you can use a regex search and replace- Press CTRL + H
- Click the .* button to search using regular expressions.
- To search for tabs enter [\t] in Find box.
- Enter spaces in Replace box and perform your replace.
- Open files always in a new tab
When you [single] click a file in the sidebar, Visual Studio Code opens it in what’s called “Preview Mode“, which allows you to quickly view files. Preview Mode tabs are not kept open. As soon as you go to open another file from the sidebar, the existing Preview Mode tab (if one exists) is used. You can determine if a tab is in Preview Mode, by looking at its title in the tab bar. If the title is italic, the tab is in preview mode. To open a file for editing (i.e. don’t open in Preview Mode), double-click on the file in the sidebar.If you want to disable Preview Mode all together, you can do so by setting"workbench.editor.enablePreview": false
in your settings file. - Toggle sidebar visibility
Ctrl + B - Navigate through history of files
To check the history of navigated files open this window from “Goto–> Navigation History” or by just simply pressingCtrl + Tab
. This will bring list of all previously navigated files. To easily navigate between the history filesAlt + Left Arrow – Navigate To Previous File Alt + Right Arrow – Navigate To Next File
Reference :
Default Keybindings on Windows