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.
The preview is now available for download and you can grab a copy here:
https://code.visualstudio.com/Download
The application is provided in a ZIP archive and is roughly 61 MB.
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:
./Code
...and that's it! If everything went well, you should end up seeing the 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.
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:
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:
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:
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:
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:
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:
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:
More features are planned for Code and you can keep track of them here:
http://visualstudio.uservoice.com/forums/293070-visual-studio-code
(You can also suggest features after registering.)
Download the official 2buntu app for both Android and Ubuntu Touch.