- What is
VS Code Basic LayoutCustom LayoutEditorActivity BarPrimary SidebarStatus BarEditor ToolbarCommand PalettePanel ToolbarVS Code Terminal- Open the
VS Code Terminal - Close the
VS Code Terminal - Open a new
VS Code Terminal - Switch to another
VS Code Terminal - Delete a
VS Code Terminal - Copy text inside the
VS Code Terminal - Paste text inside the
VS Code Terminal - Look at the open
VS Code Terminals - Look at the current
VS Code Terminal - Check the current shell in the
VS Code Terminal - Expand the sidebar with open
VS Code Terminals - (
Windowsonly) Switch to theLinuxshell for theVS Code Terminal - Run a command in the
VS Code Terminal
- Open the
ExplorerSource ControlExtensions- Keyboard shortcuts
- Workspace settings
- Common actions
- Language server
- Set up
VS Code
Important
The first keyboard shortcut is always for Linux.
It usually coincides with the shortcut for Windows.
You can check shortcuts for your platform in the reference.
VS Code (Visual Studio Code) is a free, open-source code editor made by Microsoft. It provides features like syntax highlighting, a built-in terminal, extensions, and Git integration.
Docs:
Default user interface (UI).
Docs:
Schema that we use in docs:
Custom UI appearance.
Docs:
Actions:
Move the Primary Sidebar to the right so that it doesn't move your code whenever the Primary Sidebar opens.
Change the workspace settings if you don't like that the Primary Sidebar on the right side.
Space where you can edit files.
Location: see Basic Layout.
Docs:
Menus of extensions on a side of the Editor.
Location: see Basic Layout.
Views on a side of the Editor. See Basic Layout.
Docs:
Actions:
For example, open the Source Control.
Click icons in the Activity Bar.
Statuses and menus of extensions at the bottom of the VS Code window.
Quick actions buttons located above the Editor.
Run editor commands in VS Code.
Docs:
Actions:
- Press
Ctrl+Shift+P(Cmd+Shift+PonmacOS).
- Open the
Command Palette. - Start typing a command.
- Select the necessary command.
Method 1:
- Click the option.
Method 2:
- Change the highlighted option using
UpArrowandDownArrowon your keyboard. - Press
Enterto confirm the option.
Switch between panels.
Location: see Basic Layout.
Left side with tabs:
Right side (depends on the current tab; this one is for the VS Code Terminal):
Run terminal commands inside VS Code.
Docs:
Actions:
- Open the
VS Code Terminal - Close the
VS Code Terminal - Open a new
VS Code Terminal - Switch to another
VS Code Terminal - Copy text inside the
VS Code Terminal - Paste text inside the
VS Code Terminal - Run a command in the
VS Code Terminal
Press Ctrl+` (Cmd+` on macOS)
Press Ctrl+` (Cmd+` on macOS)
Method 1:
- Press
Ctrl+Shift+`(Cmd+Shift+`onmacOS).
Method 2:
-
Click the
+icon.
Method 1:
-
Click a terminal tab in the terminal panel.
Method 2:
- Open the
VS Code Terminal. - Press
Ctrl+PageDown/Ctrl+PageUp(Cmd+Shift+]/Cmd+Shift+[onmacOS).
-
Go to the
VS Code Terminalthat should be deleted. -
Delete the terminal.
- Select text.
- Press
Ctrl+Shift+C(Cmd+ConmacOS).
Ctrl+Shift+V (Cmd+V on macOS, Ctrl+V on Windows)
-
Look at the sidebar with a list of
VS Code Terminals.If you don't see a list of
VS Code Terminals on the right, you have only oneVS Code Terminalopen. -
(Optional) Expand the sidebar with open
VS Code Terminals.
- Open the
VS Code Terminal. - Look at one of these:
-
The
Panel Toolbar: -
Current (highlighted)
VS Code Terminal:
-
-
Look at the current
VS Code Terminal.You should see on:
-
Hover, click, and move the mouse:
-
Make sure you can run
VS CodeinWSL. -
Run using the
Command Palette:Terminal: Select Default Profile. -
There can be the following cases.
-
Case 1 (bad): You don't have the recommended extensions installed.
Return to the first step and make sure you can run
VS CodeinWSL. -
Case 2 (good): You're running
VS CodeoutsideWSL. -
Case 3 (the best): You're running
VS CodeinsideWSL. You've probably opened the directory insideWSL. This is the best case.Select
bash.
-
- Open the
VS Code Terminal. - Check the current shell in the
VS Code Terminal. - Write or paste a command.
- Press
Enter.
View the file tree.
Location: Activity Bar.
Docs:
Actions:
-
Go to the
Activity Bar. -
Click the
Explorericon.
- Open the
Explorer. - Search for the file in the file tree.
- Click it.
Interact with Git via VS Code UI.
Docs:
Actions:
Method 1:
-
Go to the
Activity Bar. -
Click
Source Control. -
Click
CHANGESto uncollapse the view.
Method 2:
- Press
Ctrl+Shift+G G(Ctrl+Shift+GonmacOS) - Click
CHANGESto uncollapse the view.
Method 1:
-
Go to the
Activity Bar -
Click
Source Control.
Method 2:
- Click outside of the
Editor. - Press
Ctrl+B(Cmd+BonmacOS).
Install extensions for VS Code from VS Code Marketplace to enable new functionality.
Docs:
Actions:
Method 1:
- Go to the
Activity Bar. - Click the icon
Extensions.
Method 2:
- Press
Ctrl+Shift+X(Cmd+Shift+XonmacOS).
- Open the
Extensions. - Write:
-
Option 1: the extension name
Example:
GitHub Copilot Chat -
Option 2: the extension identifier
Format:
<extension-publisher>.<extension-name>Example:
github.copilot-chat.
-
- Click the extension.
- Click
Install.
-
Click the icon
Filter Extensions.... -
A menu will open.
-
Select a filter in the menu and click it to apply the filter.
Note
Recommended extensions are listed in .vscode/extensions.json.
-
Open in
VS Codethe directory that contains.vscode/extensions.json. -
Click
Recommendedin the menu. -
Click
WORKSPACE RECOMMENDATIONSto uncollapse this view. -
Click the icon
Install Workspace Recommended extensions.
Tip: (Windows only) If you want these extensions to be available when you open VS Code not in WSL, complete these steps again without first opening the directory in WSL .
Keyboard shortcuts for various commands.
Docs:
- Go back
- Switch to the previous editor
- Search in the current editor
- Search in all files
- Toggle line comment
Ctrl+Alt+- (Ctrl+- on macOS)
You can set another shortcut:
<command-name>isGo Back;- Get the
Alt+-shortcut by typingAlt, then-.
Ctrl+Tab
Ctrl+F (Cmd+F on macOS)
Ctrl+Shift+F (Cmd+Shift+F on macOS)
- Select a line or place cursor at that line.
- Press
Ctrl+/(Cmd+/onmacOS)
Tip
This shortcut also works for a sequence of lines:
- Select lines.
- Press the shortcut.
- Run using the
Command Palette:Preferences: Open Keyboard Shortcuts. - Write the keybinding name.
- In the
Command column, find the<command-name>. - Double-click the row with that command.
- Type the shortcut.
- (Optional) Press
Escto reset the input. - Press
Enterto save the shortcut.
VS Code settings for the workspace.
Docs:
Settings for this workspace are in .vscode/settings.json.
Here are some workspace settings that you can change:
files.autoSave- Enabled to save your work if VS Code closes;editor.formatOnSave- Enabled to run formatters when you pressCtrl+S(orCmd+SonmacOS) to save code.Markdowneditor and preview synchronization settings - Disabled for smoother scrolling of the editor and the preview.
Note
The <directory-name> is the name of a directory that you want to open.
Example: software-engineering-toolkit
-
Run using the
Command Palette:File: Open Folder... -
Find the directory
<directory-name>. -
Open this directory.
VS Codeshould now open in that directory. -
You should see
<DIRECTORY-NAME>there.Example:
SOFTWARE-ENGINEERING-TOOLKIT -
(
Windowsonly) Reopen the directory inWSLto use the file system ofLinux.
- Run using the
Command Palette:WSL: Open Folder in WSL... - Click
Show Local. - Select the directory.
- Check the current shell in the
VS Code Terminal.
- Run using the
Command Palette:WSL: Reopen Folder in WSL. - Choose
Ubuntu 24.04. - If you don't see such an option, set up running
VS CodeinWSL
- Method 1: Open the local file using
Explorer - Method 2: Open the file using
Quick Open - Method 3: Open the file using
code - Method 4: Open the file using a context menu
- Press
Ctrl+P(Cmd+PonmacOS). - Start typing the name of the file.
- Select the file.
-
Open a new
VS Code Terminalif something is running in your currentVS Code Terminal. -
To open a file from the terminal,
code <file-path>See
<file-path>.Note: the file will be created if it doesn't yet exist.
- Right-click a file.
- Find
Open with...or similar. - Choose
VS Code.
Note
See Markdown.
Method 1:
- Go to the
Editor Toolbar. - Click
Open Preview to the Side.
Method 2:
Markdown: Open Preview to the Side
A language server provides smart features for a programming language: type information, documentation, navigation, and refactoring.
VS Code uses the Language Server Protocol to communicate with language servers.
Docs:
Actions:
- Hover over a variable, function, or other symbol.
- A tooltip will show the type information.
- Hover over a variable, function, or other symbol.
- A tooltip will show the documentation (if available).
Method 1:
- Hold
Ctrl/Alt(CmdonmacOS). - Click the symbol.
Method 2:
- Right-click the symbol.
- Click
Go to Definition.
Method 3:
- Place the cursor on the symbol.
- Press
F12.
Method 1:
- Right-click the symbol.
- Click
Rename Symbol. - Type the new name.
- Press
Enter.
Method 2:
- Place the cursor on the symbol.
- Press
F2. - Type the new name.
- Press
Enter.
Follow the installation instructions for your platform:
Steps:
-
Open a terminal (not the
VS Code Terminal). -
To install
UbuntuinWSL,wsl --install -d Ubuntu-24.04Note:
Ubuntuis aLinuxdistro. -
Open
VS Code. -
Install the extension with the identifier
ms-vscode-remote.remote-wsl.This extension lets you use
VS CodeinWSL.
-
To check that the
codecommand is available,code --versionThe output should be similar to this text:
1.109.0 bdd88df003631aaa0bcbe057cb0a940b80a476fa x64



















