📅 2016-Aug-11 ⬩ ✍️ Ashwin Nanjappa ⬩ 🏷️ keyboard shortcuts, vscode ⬩ 📚 Archive
I am finding Visual Studio Code to be very useful as a light IDE and editor for C++ and Python code on Linux.
Some keyboard shortcuts that I find useful:
Ctrl + B: Toggle sidebar
Ctrl + P: Type file to open
Ctrl + R: Reopen recent folder
Ctrl + Shift + F: Search for text in files
Ctrl + Shift + P: Type editor command to execute
Ctrl + \: Open copy of current file in a side split
Ctrl + Shift + V: Preview current file (useful for Markdown)
Ctrl + G: Jump to line number
Ctrl + Shift + O: Jump to symbol in current file
Ctrl + T: Jump to symbol in current workspace
F12: Go to definition
Ctrl + Alt + -: Go back
Ctrl + /: Toggle line comment
The full list of keyboard shortcuts can be seen here.
Some user interface tips:
Open in tabs in main split: Single-click on a filename in the sidebar opens it in the current editor tab in the main split. (Note how the filename is displayed in italics.) Double-click on a filename in the sidebar opens it in a new editor tab in the main split.
Open in tabs in second split: Single-click on a filename in the sidebar opens it in the current editor tab in the second split. Double-click on a filename in the sidebar opens it in a new editor tab in the second split.
Make currently open file own the tab: Double-click on the tab. The filename changes from italics to normal, showing that the file now owns that tab.
Set color theme based on OS theme: This is so that VSCode can automatically switch to dark theme if OS is in dark mode and switch to light theme if OS is in light mode.