Since its inception two years ago
Visual Studio Code
has proven itself to be a remarkably versatile and adaptable editor. Its availability across Windows, Mac, and Linux also makes it appropriate for a number of different workflows that developers may have previously used terminals, editors, or IDEs for. This article explores a number of alternative workflows that can be adapted to Visual Studio Code.
Guest post by
Microsoft Student Partner at the University of Oxford
Hi I am currently studying Computer Science at the University of Oxford.
I am the president (2017-18) and was the secretary (2016-17) of the Oxford University Computer Society, and a member of the Oxford University History and Cross Country societies. I also lead a group of Microsoft Student Partners at the university to run talks and hackathons.
Configuring the editor
Many developers prefer to use bindings similar to their editor of choice, so I'd first recommend installing key bindings for either
. I'm a particularly big fan of the Vim extension because it supports all of Vim's regular modes, which makes it really easy to manipulate blocks of text inside Visual Studio Code just as you would in Vim. Furthermore, it also emulates
, which are two of my favourite extensions for navigating code.
If you are used to terminal based editors like Vim or Emacs you may also wish to set these settings, as they are likely to be close to what you are used to:
// Place your settings in this file to overwrite the default settings
"editor.rulers": [ 80 ]
In addition to these preferences, I also like to be able to soft-wrap files at a certain line length limit; you can do this with the
extension. This is often useful if you have to jump between terminal editors and Visual Studio Code.
With its integration with
Chrome's Developer Tools
Web developers can further extend their experience with extensions for
. I would also recommend installing the
extension, as this helps to ensure that developers meet a consistent coding style across an organisation. Furthermore, it supports a wide variety of configuration options, so there is need to have tabs vs. spaces debate!
Editing F# projects and scripts
, an open-source cross-platform functional programming language by Microsoft that runs on the .Net stack is becoming increasingly popular, especially in finance and scientific computing. Whilst Visual Studio (on Windows and Mac) remains the only official IDE for F#, you can turn Visual Studio Code into a fantastic IDE for F# with the
extension. It has full support for running and debugging F# projects and scripts (
files), along with the usual IntelliSense, code annotation, and code navigation features we've come to expect from Visual Studio.
An IDE for Go
Whilst there is no official IDE for Google's
programming language, Visual Studio Code can easily support code completion via the
. I've found that this extension can easily handle large projects very well, and I much prefer using it to editing Go in a regular text editor without completion. Furthermore, the extension can also be configured to use the
Go language server
, which uses the
Language Server Protocol
by Microsoft rather than repeatedly calling the Go tools. The Language Server Protocol is a cross-editor cross-platform project being lead by Microsoft that standardises how editors communicate with the tooling that comes with programming languages. As more languages begin to support it you can expect Visual Studio Code - and many other editors - to rapidly gain code completion support.
C and C++
After trying several different extensions, I found that the two best extensions for working with C and C++ are
Microsoft's official C++ extension
extension. The first of these adds support for code completion and debugging, whilst the second supports automatically reformatting your code. Both extensions work best when you have the
tools already installed on your system (these are available as part of the
Apple Developer Tools
When working with C/C++ I'm often working with embedded platforms or with low-level x86 code, so I also like to have extensions for
Hopefully you've seen over the course of this article that Visual Studio Code can easily be adapted with a wide array of plugins to support almost any developer workflow on any platform. I encourage you to also check out the links below for other plugins and useful hints.