We’ve searched high and low, scouring the Internet, hunting for the top 10 time-saving Python plugins (extensions, if you prefer) for VS Code. Some focus on speed and productivity, others on keeping documentation tight and tidy. Every experienced developer knows that a solid set of tools can make all the difference between a painful Python experience and a friction-free workflow – let’s get started.
- Python (Microsoft)
Every journey starts with a first step. We suggest you start by installing Microsoft’s Python plugin. VS Code doesn’t support Python out of the box, but it will suggest the plugin once you open a Python file.
The plugin is packed with helpful features like:
- Pylint or Flake8 support for linting your code
- Syntax highlighting for Python files
- IntelliSense support for code navigation and formatting
- Support for Jupyter Notebooks, Pytest, and Unit tests
- Python Preview
If you’re looking to find and fix bugs faster, you should definitely give Python Preview a try. Its intuitive visual style simplifies your bug hunting and helps bring your vision to reality.
With millions of installs in Marketplace, Tabnine’s AI assistant is among the most popular extensions. Loved by developers from around the world, Tabnine eliminates repetitive typing tasks with its instant inline code completions. Tabnine’s AI is trained on more than a billion lines of open source code with permissive licenses and continues to learn as you use it. Tabnine works in all of the most popular IDEs, and with your favorite languages, including Python.
- Python Docstring Generator
This is a great plugin to help you keep your module, method, class, and function documentation clear and concise. PDG follows all standard formats and has support for args, kwargs, decorators, errors, and parameter types. PDG defaults to multi-line docstring creation for an excellent commenting experience.
- Python Indent
Python Indent is a great workaround for some of VS Code’s bad indent habits. For example, pressing enter in VS Code will move your cursor to the far left of the window. That can get annoying quickly if you’re writing Python code. Python Indent recognizes and reacts to the status of your brackets and can speed up your coding by adding a closing bracket automatically. Python Indent is an awesome upgrade that helps turn VS Code into a better Python IDE.
- Python Snippets
Everyone enjoys a good snippet now and then, especially junior devs who are just starting out. Python Snippets has loads of snippets that cover all your most common needs like string, list, sets, tuple, dictionary, class, and more. All of the snippets come with at least one example which can be a major help for determining if you’ve found the right snippet for you.
- Better Comments
Once you get in the flow it can be easy to forget about stopping to add proper comments. The Better Comments plugin makes it easy to circle back and add comments. You can also add styling and categorization to your comments so that they’re easy to manage and navigate during future coding sessions.
- Bracket Pair Colorizer 2 (CoenraadS)
BPC2 makes it easy to identify which brackets belong to each other by color. This updated version improves upon the speed and accuracy of the original, making it far easier to read and validate your code.
- Git Lens
This is a massively helpful extension if you’re working as part of a development team and want to keep track of who changed what code where, how, and when. Hover your mouse over the details feature to see git blame annotations per line, per file, or in the status bar. There’s also a quick access command bar that allows you to change to the previous commit revision, open changes, do diffs, and show commit details.
If you find yourself spending heaps of time digging through documentation hunting for information about Classes, Functions, or Types, Dash may be the perfect solution for you. Dash is an API Documentation Browser and Code Snippet Manager for macOS. Simply highlight your code and press ctrl + h and Dash will serve you all the documentation you need offline.