Note: This post was originally published in 2021 and has been updated as of Jan. 3, 2022.
Visual Studio Code, maintained by Microsoft, is one of the most popular open source code editors out there. VSCode aims to offer all the tools you need while cutting out the complex workflows of full IDEs. Many programmers prefer VS Code because it offers so many extensions for added functionality, productivity, debugging, and speed.
In this quick guide, we’ll go over the top 10 VS Code extensions that any web developer should use in 2022. We’ll discuss what they do and how they can make your coding life easier. Let’s jump in!
Our top Visual Studio Code extensions:
The VS extension Bracket Pair Colorizer matches corresponding brackets in your code with the same color. This is a great help when you’re working with things like nested components, objects, or functions that all have brackets or parentheses.
With this simple extension, it’s much easier to find matching pairs and understand your code. The biggest advantage of this extension is improved navigation and accessibility. It also makes it easier for others to read and understand your code.
Better Comments is an extension used for writing human-friendly comments in your code, which is helpful for you and anyone who is reading source code (especially for teams). Descriptive, human-friendly comments save so much time for everyone involved.
With this VS extension, you can use the following characters after a double forward slash
// to add easier commenting:
*for highlighted text
!for errors and warnings
?for queries and questions
Snippets are an excellent add-on for productivity. Snippets is a collection of various extensions for the most commonly used programming languages. The React Snippet is a popular extension, for example, that allows you to use and create shorthands for things you do over and over again.
Some popular options are:
CSS Peak is a great extension for web developers, as it allows you to “peek” at the styles for CSS classes, ids, and even HTML tags. This extension is similar to the Brackets feature called CSS Inline Editors.
CSS Peak supports symbol definition tracking for any CSS selector, for example:
The Prettier extension is a formatter that helps to keep code style consistent. You can configure your settings however you need and save with shortcuts. Prettier is one of the most popular code formatters out there, with over 38.5k stars on GitHub.
Prettier will automatically fix formatting issues in your code, like fixing the mix of single and double-quotes or an irregular use of semicolons.
Relative Path is a great extension for writing import statements. You can easily get the relative path for any file using shortcuts in your workspace. Instead of searching for file’s location, you only need the file’s name, and the extension will provide the relative path from the current location to that target file.
Note: It will require some configuration if you’re working with a large mono-repository.
Educative’s Learning Paths are carefully curated to help you achieve a specific learning goal. Educative’s text-based courses are easy to skim and feature live coding environments, making learning quick and efficient.
Icons allows you to create descriptive icons to help differentiate between files and folders. This makes your code more visual, so it’s easier to work as teams, return to code after some time, or even just make the experience more fun. For example, you could change the color of a default folder icon using the command palette.
There are a few different Icons extensions, including
The GitLens extension combines the capabilities of Git with VSCode that allows you to visualize code authorship via Git. GitLens is great for understanding code better, so you can learn who, why, and when code was changed. It also allows you to explore the history and evolution of a codebase.
It also has many other features to use such as:
The Import Cost extension helps with productivity by showing the estimated size of an import package. This helps to avoid issues by tracking the size of added dependencies.
If an import is too large, the Import Cost extension will warns you so you can reconfigure based on the requirements you set.
Markdown All in One is a very useful extension for all things markdown related. It adds features like auto-preview, shortcuts, syntax autocomplete, and more. Markdown is commonly used across many tech fields, and this extension makes it even easier to work with, boosting productivity and speed.
With Markdown All in One, you can use shortcuts to alter text and add things like bold, italics, etc. It also has useful automations for working with things like lists and math. Here are some common commands:
Join a community of 500,000 monthly readers. A free, bi-monthly email with a roundup of Educative's top articles and coding tips.