
Image by author
Virtual Studio Code (VSCode) is one of the popular Integrated Development Environments (IDE) for Python development. It’s fast and packed with rich features that make the development experience fun and easy.
VSCode’s Python extensions are one of the prominent reasons I use it for all work-related tasks. It provides you with syntax auto-completion, linting, unit testing, Git, debugging, notepads, editing tools and the ability to automate most of your tasks. Instead of doing things manually, you can press keyboard shortcuts or press a few buttons.
In this post, we’ll learn how we can take VSCode to the next level and be more productive in creating Python software and solutions.
Note: If you are new to VSCode and want to learn all the basics, read the Setting Up VSCode For Python tutorial to understand the main features.
You can run VSCode Terminal or bash using CLI commands.
- Open VSCode in the current directory.
code .
- Open VSCode in the current directory in the most recently used window.
code -r .
- Create a new window.
code -n
- Open a different file editor VSCode.
code --diff <file1> <file2>
Access all available commands and shortcuts based on the current context. You can start the Command Palette using the keyboard shortcut: Ctrl+Shift+P. You can then enter related keywords to access specific commands.

Image by author
What’s better than a command palette? keyboard shortcuts. You can modify the keyboard shortcuts to suit your needs or learn about the default keyboard shortcuts by reading the keyboard shortcuts fact sheet.
Keyboard shortcuts will help us directly access commands instead of scrolling through command palette options.
Quickly access errors and warnings using a keyboard shortcut. Ctrl+Shift+M and cycle through them by clicking on the warning or clicking F8: or Shift + F8 keys.

Image by author
You can customize themes, Icons, keyboard shortcuts, debugging settings, fonts, skins, and code snippets. VSCode is a fully customizable developer environment that even lets you create your own extension.
VSCode extensions for Python can improve the development experience and make you productive. It’s not all about productivity. It is also about the visuals. The most popular Python extensions in the Visual Studio Marketplace provide an interactive user interface with statistics and graphs.

Image by author
Check out this list of 12 essential VSCode extensions for data science that will make VSCode a super app so you can do all your data science tasks without leaving the app.
The most important extension that allows you to perform data analysis and machine learning experiments is the Jupyter Notebook extension.

Image by author
This extension is highly recommended for data scientists to perform data science experiments and generate production-ready code.
Multiple cursor selection is a lifesaver when you need to make multiple edits to the same pattern.
- Add multiple cursor points using Alt+Click:
- Use to place the cursor at the top Ctrl+Alt+Up or below Ctrl+Alt+Down
- Add additional cursors to all occurrences of the current selection using Ctrl+Shift+L

Image from Visual Studio Code
I know this is a simple feature, but it’s pretty handy when you’re editing similar variables, arguments, and parameters in different places in a file. You can search and replace them one by one or all at once.
To rename a symbol or argument, select the symbol and press the button F2: key

Image by author
It’s a built-in integration that lets you perform all Git-related tasks by clicking a few buttons instead of typing the Git command in the CLI. You can visualize the history, see the difference and create new branches, all interacting with a user-friendly GUI. It’s even easier than the GitHub Desktop app.

Image by author
Code snippets are similar to autocomplete, but you have more power over them. You can create custom code snippets with repeating code patterns. Instead of creating a Python function, you can type in a word and it will do the rest.
Select to generate a custom code snippet file: >: Preferences: >: Configure user segments then select the language.

Image by author
Everyone talks about ChatGPT for code suggestions, but GitHub Copilot has been there for over two years, and it better understands user behavior and helps them write code quickly and efficiently. GitHub Copilot is based on GPT-3, which enhances the development experience by offering lines of code or full functionality.

Image from GitHub Copilot
Abid Ali Awan (@1abidaliawan:) is a certified data scientist who loves building machine learning models. He currently focuses on content creation and writes technical blogs on machine learning and data science technologies. Abid holds an MSc in Technology Management and a BS in Telecommunications Engineering. His vision is to create an AI product using a graph neural network for students struggling with mental illness.