Visual Studio Code (VS Code) is one of the most popular code editors with millions of downloads every year. One nice thing is their rich ecosystem of VS Code Extensions, which lets you add tools for improving your development experience.
As heavy Python users, we should use extensions to make us the most productive version of ourselves.
In this article, I will show you 10 Extensions, which supercharged my productivity. And they are for free.
GitHub Copilot is another essential extension, but since it’s not for free, I am not listing it here. You can still check it out since it boosts your development experience too.
1. Python (by Microsoft)
This VS Code Extension is a no-brainer when working with Python. It offers rich support to boost your productivity. The features are:
Auto-completion and syntax checking with IntelliSense
Linting your code with e.g. flake8
Format your code with e.g. black
Debug your code
Support for Jupyter Notebooks
Automatically activate environments like pipenv or conda
Refactoring your code with e.g. Ruff
When you work with Python, this Extension is a must-have!
2. Python Indent
IndentationError: expected an indented block. We all had to go through this annoying error. With Python Indent, you don’t have to worry about nasty Indentation Errors. Every time you press Enter, it determines the exact indentation of the next line.
3. Indent-Rainbow
Continuing with Indents, Indent-Rainbow colorized the indentation in front of your text. This improves readability for Python files, but also for YAML, Nim, and more. You can even customize the colors.
4. autoDocstring
autoDocstring makes it easy to add docstrings to your functions, methods, classes, and modules. You just have to press Enter after typing triple quotes. There are predefined formats like Sphinx, NumPy, and Google. But you can even define your custom format.
No excuses for not using docstrings.
5. AREPL for Python
Wouldn’t it be nice to see the changes in your Python code in real-time? AREPL for Python does exactly that. It evaluates your code while you type without running it manually.
6. Better Comments
This extension turns your boring comments into useful categories. It supports not only Python but basically every programming language.
7. Todo Tree
Do you remember about all the TODOs and FIXMEs in your comments? Todo Tree displays your comment tags into a tree for easy ticking off the ToDos.
8. GitLens
I hope you use any kind of version control. If it’s git (which I assume), GitLens is a nice extension for you. It can show who changed which line of code, navigate within the git history of a file, or highlight any locally changed line.
9. Markdown All in One
A good project has a better README. To write awesome READMEs, use this extension. It provides useful features like:
Auto-preview
Keyboard shortcuts
Fast list editing
You will crush your next README with Markdown All in One.
10. AWS Toolkit (CodeWhisperer)
Github Copilot changed the way I work. But, not everyone has (or wants to spend) the bucks for it. AWS CodeWhisperer is a great alternative without spending a penny. You just have to create an AWS account and enjoy the code completion by AI.
Conclusion
VS Code has over 40K extensions on its marketplace. So it can be overwhelming to find the right ones for your Python development. I showed you 9 extensions you will be fine with installing them.