Skip to content

Visual Studio Cheat Sheet

A copy+pasteable collection of common keyboard shortcuts, tips, and tricks for using Visual Studio Code .

--- Access the command palette -----
cmd + shift + p

--- Manage user settings ----------------
1. Open the command palette (cmd + shift + p)
2. Preferences: Open User Settings (JSON)

--- Install an extension ----------------
cmd + shift + x

--- Hide the sidebar --------------------
cmd + b

--- Find next occurrence of selected text ----------------
cmd + d   <- default

--- Insert boilerplate html code -----------
type html > select html:5 from the autocomplete suggestions

--- Modify keyboard shortcuts ----------------
code > preferences > keyboard shortcuts

--- Search for filename ----------------
cmd + p

--- Search in all files --------------
cmd + shift + f

--- How to generate multiple cursors ---------
method 1: option + click
method 2: cmd + option + <arrow down>

--- How to set up a new task ------------------------------
1. Open the command palette
2. Tasks: Configure Task
3. From template
4. Other

Helpful notes - https://stackoverflow.com/a/56067344/2146894

--- How to set up a new python project -----
1. File > Open folder
2. Open the terminal (ctrl + backtick)
3. Create a new virtual environment: python3 -m venv .venv
4. Activate it: source .venv/bin/activate

If the python interpreter isn't automatically recognized by VSCode..
1. Open the command palette (cmd + shift + p)
2. Type and choose "Python:Select Interpreter"
3. Select the interpreter
4. Start a new terminal session
--- Access the command palette -----
ctrl + shift + p

--- Manage user settings ----------------
1. Open the command palette (ctrl + shift + p)
2. Preferences: Open User Settings (JSON)

--- Install an extension ----------------
ctrl + shift + x

--- Hide the sidebar --------------------
ctrl + b

--- Find next occurrence of selected text ----------------
ctrl + d   <- default

--- Insert boilerplate html code -----------
type html > select html:5 from the autocomplete suggestions

--- Modify keyboard shortcuts ----------------
code > preferences > keyboard shortcuts

--- Search for filename ----------------
ctrl + p

--- Search in all files --------------
ctrl + shift + f

--- How to generate multiple cursors ---------
method 1: alt + click
method 2: ctrl + alt + <arrow down>

--- How to set up a new task ------------------------------
1. Open the command palette
2. Tasks: Configure Task
3. From template
4. Other

Helpful notes - https://stackoverflow.com/a/56067344/2146894

--- How to set up a new python project -----
1. File > Open folder
2. Open the terminal (ctrl + backtick)
3. Create a new virtual environment: python3 -m venv .venv
4. Activate it: source .venv/bin/activate

If the python interpreter isn't automatically recognized by VSCode..
1. Open the command palette (ctrl + shift + p)
2. Type and choose "Python:Select Interpreter"
3. Select the interpreter
4. Start a new terminal session