Getting started with VsCode
Short tutorial with basic information
QGSL Lab | Basic VS Code Tutorial
A quick guide to getting started with VS Code. Created with new team members in mind.
Content
- Objectives
- Installation Guide
- 2.1 For Linux
- 2.2 For Windows
- Workspace Concept
- Interface Essentials
- Extensions - The Heart of VS Code
- Writing and Executing Code
- Shortcuts & Hotkeys
- Suggested Workflow
1) Objectives
- Get comfortable with the VS Code environment.
- Learn to navigate the interface without getting lost.
- Understand the basic settings for common languages (e.g.: Python/R/Notebooks).
- Master a small set of shortcuts to enhance productivity.
2) Installation Guide
2.1) For Linux
Debian and Ubuntu-based distributions
- Just run the command:
sudo apt install ./<file>.debif you have the .deb file. - Another option is to run the prompt
sudo snap install code --classicto install via snap. - You can also use this link to download the graphical installer.
2.2) For Windows
- Download the installer from: https://code.visualstudio.com/download
💡 Note: For Mac, other Linux distros, and more information, you can access the official website here.
3) Projects and Workspaces in Visual Studio Code
VS Code considers a "workspace" to be the collection of one or more folders that are opened in a VS Code window. When you open a folder in VS Code, it becomes your current workspace.
It is important to mention that VS Code can be configured in a user-specific way (e.g., settings, keybindings, themes) for each workspace, giving you two levels of control:
- User settings: Global settings for all workspaces.
- Workspace settings: Specific to each workspace.
4) VS Code Interface Essentials
| Component | Description |
|---|---|
| 1 - Activity Bar | Explorer: Manage files; Search: Global search; Source Control: Git integration; Extensions: Manage plugins. |
| 2 - Side Bar | Displays the content of the selected Activity Bar item. |
| 3 - Editor | Where you code. Tips: Alt + Z (Word wrap) and AI Autocomplete/IntelliSense. |
| 4 - Terminal | `Ctrl + `` to toggle. Supports multiple instances (Bash, Python, R, etc.). |
5) Extensions - The Heart of VS Code
In VS Code, extensions transform the editor into a complete work environment. Remember: the fewer the better. Only install and activate what you're going to use.
Tip: Use Profiles to create different environments (e.g., Data Analysis vs. Web Dev) so you only load necessary extensions.
5.1 Managing extensions
- Open the panel with:
Ctrl + Shift + X - Install: Some may require a reload.
- Disabling: If an extension causes issues, you can disable or uninstall it.
5.2 Recommended for Data Analysis
- 📦 Essentials:
- Python: IntelliSense, debugging, and environment management.
- Jupyter: Support for
.ipynbnotebooks. - R: Install the R extension and the
languageserverpackage in R.
- ✨ Code Quality:
- Prettier: Consistent code styling.
- Error Lens: Highlights errors directly in the editor.
- GitLens: Line-by-line history of changes.
6) Code Execution
6.1 Three ways to execute code
- Via Editor: Using the Play button ▶️.
- Via Terminal: Running commands directly in the folder. Best for large pipelines.
- Via Selection: Execute only selected lines (similar to
Ctrl + Enterin RStudio).
6.2 Python: Interpreter and Environment
Common mistake: Using the wrong Python version. If using a venv, ensure the correct interpreter is selected.
- Open the Command Palette (
Ctrl + Shift + P) → Python: Select Interpreter.
⚡ Bonus: The Command Palette is one of the most useful features in VS Code.
6.3 Notebooks (.ipynb)
- Open
.ipynbfiles directly. - Run code cell by cell.
- Choose the right Kernel (Python/R) when prompted.
6.4 Quick Diagnosis
- Is the language extension installed?
- Is the correct Interpreter/Kernel selected?
- Are you in the right workspace (check terminal path)?
- Are dependencies installed in your current
venv?
7) Essential Hotkeys
| Hotkey | Action | Why it matters? |
|---|---|---|
Ctrl + P | Quick Open | Quickly search and open files. |
Ctrl + Shift + P | Command Palette | The easiest way to find any command. |
Ctrl + D | Select Next Match | Useful for renaming variables across multiple lines. |
Alt + ↑ / ↓ | Move Line Up/Down | Reorganize code without cutting and pasting. |
Ctrl + / | Toggle Comment | Instantly comment/uncomment selected lines. |
8) Recommended Workflow
- Open the project folder (Workspace).
- Enable the extensions required for your task.
- Select the correct interpreter or kernel.
- Write and execute your code.
- Master the common hotkeys.
Finally: VS Code is a powerful tool with multi-language support that will significantly improve your research efficiency.
By: João Paulo Gusmão Teixeira for internal use at QGSL on 08/02/2026


