In a rush? Skip to comparison directly.
Node or PHP?
Headless or traditional CMS?
React or Vue?
VS Code or Sublime?
Different projects require different tools. Developers must pick the right ones, which is no small task in this fast-paced environment.
And your first pick—choosing a code editor—is crucial.
In this post, I want to explore two of them, Visual Studio Code and Sublime Text, and help you make that decision.
Why these two, you ask? Because:
They're two of the most popular code editors right now.
They're the ones our team has used the most.
I'll present both of them, and compare their advantages & limitations.
What is Visual Studio Code?
VS Code was released in 2015 by Microsoft. It's cross-platform, open-source, and completely free.
Don't let its young age fool you though: it grew crazy fast and already has a broad extensions & plugins community.
It's the code editor that our development team uses the most for day-to-day tasks. But I promise to stay impartial. ;)
When asking why devs choose VS Code as their primary editor, the same characteristics often come up: lean, customizable, light & fast.
Some key features also helped make it so popular. First, its super smart IntelliSense provides the best autocomplete discovery for a bunch of languages.
If you haven't heard, .NET is a big part of our development stack at Snipcart. And even though the old Visual Studio might still be better for older .NET solutions, VS Code is an excellent match for .NET Core.
All in all, Visual Studio Code is a great tool. Our team recommends it to any developers who like to fine-tune their code environment.
Its large library of extensions can be found here, in the Visual Studio Marketplace.
What is Sublime Text
Sublime is a more mature code editor, already over a decade old. It was released in 2007 by Jon Skinner, a former Google engineer. It presents itself as a a sophisticated text editor for code, markup and prose.
Also cross-platform, Sublime isn't free, at a price of 80$/license.
Much like VS Code, Sublime gets lots of praises when it comes to performance and customization.
Some say it's the fastest text editor for writing code. Not only in general performance but also to run fast searches across any number of files. It reaches this level of performance by being very, very lightweight.
Overall, Sublime is a great jack-of-all-trades platform that is sure to please any developer with its speed and stability.
All of its extensions are listed here, in Package Control.
Visual Studio Code Vs. Sublime Text
It's hard to pinpoint a clear winner in this comparison.
These are both very reliable tools. You probably won't regret your choice no matter which one you go with. Once again, this post was created to guide you through that decision.
On a pure speed level, Sublime is hard to beat. The main issue with VS Code when it comes to performance is that it's based on the Electron framework which uses an instance of Chromium. This makes the app slower at launch.
This is an issue only if you really care about these few seconds of startup load time. It looks like most developers can live with it, as VS Code is fast enough the rest of the time.
Also, Sublime's performance seems to get way more impacted by bigger projects. On the other hand, VS Code scales well in that regard.
If you're used to working with Atom though, both will feel like a significant improvement for performance!
Sublime, however, takes the win when it comes to performing quick searches. When you open a project, it automatically runs a "symbol analysis," spotting keywords in your code. With a simple command, you can easily find class names and methods within your files. You'll be able to do the same in VS Code, but only with a few languages supported out-of-the-box.
Editor customization & extensions
The main thing developers want in their dev environment it to easily make it their own. Extensions, plugins & themes give you this opportunity. And they all come in droves in both cases here.
There are so many extensions to accomplish pretty much anything with VS Code and Sublime that I won't start listing them out. But here's a short list of resources to start exploring:
When it comes to the look and feel of VS Code and Sublime, there are enough themes and sidebar options in both to shape it to your liking easily. VS Code's sidebar might offer more features out-of-the-box than Sublime, though.
Setting up your ideal environment to answer your needs will require packages research and customization on your part. But in both cases, you'll probably end up with everything you need.
However, not every extension is born equal, and it might prove more painful to reach your goals one way or the other.
For instance, two essential features that come built-in with VS Code while lacking in Sublime are Git integration and an in-editor debugger for multiple languages.
For a lot of developers, these are huge incentives to switch to VS Code.
To expend Git capabilities in VS Code, our team likes the GitLens extension. It lets you see Git blame annotations in a side panel and the editor, amongst other things.
Overall, considering most general capabilities, it's still almost impossible to discern a clear winner. To do so, we have to get into specific needs.
It has more built-in capacities for JS
It has excellent extensions to build any frontend developers' dream setup
Once again, there's a load of extensions to expand JS capabilities in VS Code. There are already some good resources listing them too, but here's some we use regularly:
→ Vetur. Tooling for Vue.js with cool features such as syntax highlighting, snippets & autocomplete. Vue 2 Snippets also does kind of the same stuff. We love Vue.js, and these tools provide great assistance.
→ npm. Supports running npm scripts defined in the
package.json file and validating the installed modules against the dependencies defined in the
→ Previously mentioned Debugger for Chrome and GitLens.
Verdict (well, kind of)
Every project is different: you may end up working with multiple code editors! I've only talked about two here, but there are many more out there that we should keep exploring. :)
For now, I'd like to know your opinion towards Visual Studio Code and Sublime Text? Which one do you personally use for JS development, and why? Any important extensions I left out?
Let me know in the comments below!
If you've enjoyed this post, please take a second to share it on Twitter. Got comments, questions? Hit the section below!