Visual Studio Code vs Sublime Text

Jeremy Strawn   |   Feb 08, 2017

Visual Studio code has been slowly gaining popularity since its announcement in April of 2015. Through my network of friends and coworkers, I'd heard more and more about it until finally it reached a point that I felt I should see what all the fuss was about. I've been an avid Sublime user for 4 years and it's given me everything I wanted in an editor (at least, until I saw what VS Code could do).

Google Trends: Sublime in red, VS Code in blue

My first impression from opening VS Code was that it was slow. I've always liked that Sublime text is quick and snappy. While I do use Visual Studio proper for C# server development, I've always preferred Sublime for my javascript because of it’s speed. With VS Code, I noticed that it took a good deal longer than sublime to start the application, open files, and even navigate through the files. (This speed difference can be seen in this article: https://blog.xinhong.me/post/sublime-text-vs-vscode-vs-atom-performance-dec-2016/). This is because VS Code is based on Electron, which is a platform that lets you create windows applications by rendering web pages. Thus, the application is essentially just opening a browser to a specific (local) website. It's the same technology the windows Slack app uses. Knowing this, there is little Microsoft can do to speed up the editor until they change it to a native app, so we shouldn’t expect this to improve any time soon.

My second impression was that I really like the look of VS Code. It has a very clean, refined look and borrows many style elements from Visual Studio. I think this was a good idea, and resulted in a very attractive editor. I definitely prefer the looks of VS Code over Sublime.

When playing around with the plugins, I found that VS Code has just as good of plugin support as Sublime, while the interface for it is more informative and convenient to use. It really feels more integrated, and like its a proper action to be taking, rather than feeling like a hacker when I add a plugin in Sublime. I suppose you could say that using a more elaborate interface in VS Code implies that you are less of a power user and more of a casual user, but personally I like the refinement and intent.

I'm a big user of multiple selection and this is the biggest selling point of Sublime for me. So I'm pleased to say that VS Code offers all the features of multiple selection that Sublime does. And, they even took some of the hotkeys (‘ctrl-d’ for selecting the next instance of the current selection). Normally I don’t condone stealing elements of the user interface, but how could I complain about hotkey stealing, when ultimately, it only makes it easier for me?

Though where VS Code really shines is in project/folder support. Yes, you can open folders in Sublime, too. But I've always felt like it was secondary support. With VS Code, the main intent of the application is to open a folder of code and use it as a project. In fact (if you choose this option during installation), it adds a context menu item to open VS Code from a folder when in the file explorer, which is really nifty. If you’ve already installed VS Code without checking this option, you can run the installer again to choose it.

Opening folder with VS Code

The other big selling point of VS Code for me was the intellisense. I've always loved the intellisense features of Visual Studio when I've programmed C#, but always took it as a matter of course that there would be no intellisense when working with javascript, regardless of IDE. Well, VS Code comes with ready-to-use intellisense when working with javascript, and it supports all the new ES6 features like Classes. I will point out though, that the intellisense will only work across files if you are using modules with the CommnJS or the ES6 syntax. They say that they are working on support for other module systems though, like UMD and AMD. Specifically they are missing intellisense with the “define” functions for loading dependencies. I created a quick github repo to show the two available options in action: https://github.com/TeamVirtuoso/vs-code-javascript-intellisense.

Javascript intellisense in VS Code

My final point is that since VS Code is still in it's infancy, it's missing some pretty important quality of life features. The biggest one is the lack of the scrollbar minimap. However, it's currently the most asked-for feature on the github page, so I'm sure they will be adding it soon. The other key feature that I feel is missing is mouse selection drag-and-drop. Though I will point out that drag-and-drop was the main issue that Sublime was missing 4 years ago, and that stopped me from using Sublime until they added it. So even though it feels like a no-brainer feature to me, I understand that they're doing pretty well for how new the editor is.

All in all, I think VS Code is a great light-weight editor for projects and I'm currently using it for editing a large javascript single page app, but Sublime text it still my go-to editor for single files and quick notes.


In conclusion:

Sublime

  • Faster
  • Scrollbar minimap
  • Mouse drag-and-drop

VS Code

  • Better directory/project support
  • Easier plugin support
  • Code debugging
  • Looks better/cleaner
  • Slower because it’s based on electron
  • Comparable multiple selection