Visual Studio Code Comes to Linux

Nathan Osman's Gravatar

Nathan Osman
published April 29, 2015, 5:02 p.m.

If this article would have been written a few years ago, nobody would have believed it. After all, this is the same company that once called Linux a "cancer". Today, Microsoft has taken a huge leap in cross-platform development by releasing a preview of Visual Studio Code.

And it runs on Linux.

Downloading Visual Studio Code

The preview is now available for download and you can grab a copy here:

The application is provided in a ZIP archive and is roughly 61 MB.

Running Code

After downloading the ZIP archive that is provided on the Downloads page, you will need to extract the files somewhere (~/visual-studio-code, for example). Once complete, open a terminal to the directory you extracted the files to and run:


...and that's it! If everything went well, you should end up seeing the main window:

Visual Studio Code - Main Window

If you are using Unity, you can right-click the icon in the launcher and click "Lock to Launcher" to make it easier to launch the application in the future.

The Command Palette

Users of Sublime Text will immediately feel at home with Code's command palette. It does share some similarities, including the same keyboard shortcut.

Press either F1 or Ctrl+Shift+P to activate the palette:

Visual Studio Code - Command Palette

You can begin typing part of a command name to bring it to the top of the list. Partial matches are permitted, which allows you to do this:

Visual Studio Code - Command Palette 2

The Sidebar

The sidebar can be displayed by pressing Ctrl+B or opening the command palette and typing "tsv" (an abbreviation for "toggle sidebar visibility"). By default, the sidebar will show the explorer. If this is your first time using Code, no folders will currently be displayed and you will see a button for adding one:

Visual Studio Code - Sidebar

Once a folder has been added, its contents will be displayed. Clicking on a file will immediately open it in the editor. It is possible to edit two files at the same time by holding down Ctrl when you click the second one:

Visual Studio Code - Split Files

The sidebar includes some other features as well. It can display changes to Git repositories (if applicable) including a visual diff of the changes since the last commit:

Visual Studio Code - Git

Code Completion

Code provides Intellisense code completion for a number of languages, including JavaScript. This helps save you some typing time by presenting a list of completions as you type:

Visual Studio Code - Intellisense

Multiple Cursors

Code lets you edit a file in multiple places at the same time (something that Sublime users are also familiar with). However, Ubuntu users will quickly run into a problem. The keyboard shortcut for doing this is Alt+Click, which by default will move the window instead of adding another cursor. To fix this, we need to change a setting:

gsettings set org.gnome.desktop.wm.preferences mouse-button-modifier "<Super>"

After running that command in a terminal, you will now be able to create multiple cursors:

Visual Studio Code - Cursors

Other Features

More features are planned for Code and you can keep track of them here:

(You can also suggest features after registering.)