Visual Studio Code: 5 Awesome Features That Make It A Frontrunner
Visual Studio Code is a new a code editor from Microsoft. It has recently hit its first major release cycle, 1.0.0. I’ve tried it for some times while it was in Beta, and I’m impressed with all it has brought to table this far.
Visual Studio Code (VSC) is lightweight and fast, and if you have used SublimeText or Atom before, you will immediately feel at home. VSC comes with a command palette, multiple cursor selection, snippets, and code auto-completion – the features that you surely are familiar with already.
Nonetheless, it also comes with its own signatures that makes it stand-out among the current players on the market. So, without further ado, let’s take a look.
IntelliSense is code auto-complete meets artificial intelligence. This utility provides a list of suggestions along with a short hint or description as we are writing codes. These is derived from several contextual factors such as the programming language, the syntax, the variables, the functions as well as all the codes within the file.
While coding, you may often forget a particular function, where the function is initially defined, and what are the required parameters.
Similar to SublimeText with its subl command line, Visual Studio Code is equipped a CLI named code and it is easy to install.
In Windows, the CLI will have already been installed along with the app. The CLI is accessible through the Command Prompt. In OS X, it can be installed and uninstalled through the Command Palette.
You can use the CLI to open a particular directory to Visual Studio Code, or open your current project directory in Terminal or Command Prompt directly from the editor.
4. Built-in Git
Visual Studio Code has Git built right in the editor. On the left of the sidebar, you will find the Git icon where you can initialize Git as well as perform several Git commands such as commit, pull, push, rebase, publish, and look into the changes within the file.
In addition, if you are making changes on a Git repository, the Visual Studio will show color indicators in the code editor gutter, indicating where you have made the modifications.
We will dive into Git in Visual Studio Code in the next post, so stay tuned.
5. Task Runner
Last but not least, Visual Studio Code also has a built-in Task Runner, which provides some level of convenience.
To use this feature, we can either set a tasks.json file or through some popular Task configuration like Grunt, Gulp, or MSBuild if provided. Once the configuration is set, we can run the Task Runner through the Command Palette by typing Run Task. Typing Tasks will list all related commands.
The Visual Studio Code interface, the key combinations, as well as the command palette are intuitive and familiar. All in all, Visual Studio Code is a promising code editor even though there are a couple of features missing.
Nevertheless, I’m considering switching and adapting my workflow to Visual Studio Code. I’m looking forward to the next releases, hopefully, with substantial improvements.