DEV Community

Andrew Davis
Andrew Davis

Posted on • Edited on

Sublime Text vs Vscode Why I Switched from Visual Studio Code to Sublime Text

Recently, I switched to using Sublime Text as my main code editor. For over a year, I had been using Visual Studio Code for writing code. The two editors are very similar, but have enough differences that I wanted to share what lead me to using Sublime full time. Note: this post is not about bashing one piece of technology for another. I try to give an honest comparison from my personal experience, but choosing a code editor is a subjective process, so everyone will have a different opinion about their favorite.

What Made Me Switch

Great Symbol Analysis

When you open a project in Sublime Text, it will automatically start a process called “symbol analysis” which is a fancy term for finding keywords in your code. What’s great about symbol analysis is that I can type Cmd + Shift + R to pull up a symbol search menu and quickly find class names and methods throughout my code. I mostly work with PHP so if I already know the class name I'm working on is PostController, I can search that in the symbol search and immediately have my PHP class file open in the editor.

VS Code does support symbol searches as well, however, it only supports a couple languages out of the box. There is a third-party PHP symbol analyzer that works with VS Code, however, I’ve found that it struggles with large codebases, whereas Sublime has no issue.

Super Fast

Sublime Text is the fastest text editor that you can use for writing code. It opens almost immediately and performs very quick searches. Microsoft has done a good job of keeping VS Code performant, however, VS Code is based on Electron. Electron is a framework for bundling an instance of Chromium and with your code written in JavaScript/Node.js. It makes the editor very extendable, but using an entire instance of Chromium for a text editor makes the app start up slow and use more memory. Sublime Text is a native app written in C++, so its footprint is much lower.

Better Vim Bindings

I really like to use Vim key bindings when writing code. Even though I like Vim keyboard shortcuts, I still like to use a standard text editor to take advantage of modern features like sidebar file lists and file tabs. I have found that Sublime’s Vim support is more accurate than VS Code, which helps me write code a little faster. Sublime supports Vim bindings out of the box, but you can get even more features if you use the Vintageous plugin.

Things I Miss from Visual Studio Code

Feature Rich Sidebar

VS Code has a very good sidebar that allows for more flexibility in creating and moving files. Sublime has a plugin for a better sidebar and there are other keyboard shortcut plugins like AdvancedNewFile that make the transition easier, but I miss the out of the box features of the VS Code sidebar sometimes.

Built in Debugger

VS Code has a built in debugger that works with many programming languages. It makes using PHP’s xdebug really simple. Even though Sublime has debugging plugins, they are not as solid as what VS Code offers out of the box. In this scenario, I will still open VS Code if I’m debugging something tricky.

Conclusion

In the end, text editors are all about personal preferences and job requirements. For my use case, Sublime has been a very enjoyable experience and has helped me write code faster. If you want to learn more about Sublime Text, Jeffrey Way has a course about it on Laracasts and Wes Bos wrote a book on it as well.

Let me know what your favorite editor is in the comments!

Oldest comments (78)

Collapse
 
hybrid_alex profile image
Alex Carpenter

Also in flux between Sublime Text and VS Code. Typically end up in Sublime Text due to its speed.

Collapse
 
neilmartin profile image
NeilMartin

I really like the look of Sublime, but I've stuck with Visual Studio because it has the integrated debugger (I'm developing in Unity 3D). Using one editor is faster than switching between two editors, so no debugger is a deal breaker for me. You mention sublime has debugger plugins which is news to me, how well do they work? Which ones have you tried?

Collapse
 
restoreddev profile image
Andrew Davis

I’ve used this plugin before: github.com/martomo/SublimeTextXdebug. It’s specifically for xdebug/PHP so it won’t work with C#. The plugin works, but isn’t as integrated as VS Code. How do you like using Unity? Is it easier to make games like they say?

Collapse
 
neilmartin profile image
NeilMartin

I've found a C# and a Unity plugin but I can't find anything that supports debugging. I'll stick with VS for now.
Unity is great, it's incredibly easy to use, and scales well. For beginners and pros, small to big projects. All engines have their problems but Unity makes it very easy. Unreal is a complete pain to use in comparison.

Thread Thread
 
restoreddev profile image
Andrew Davis

That’s good to know, thanks for responding! I’ve been working on a Swift iOS app which has made me curious about game development. I would like to make a game if the right idea came along.

Collapse
 
rhymes profile image
rhymes
Collapse
 
restoreddev profile image
Andrew Davis

I did, but don’t use it because of it’s previous privacy issues: qz.com/1043614/this-startup-learne...

Collapse
 
rhymes profile image
rhymes

Woah! I didn't know! Thank you for telling me. Uninstalling it now :-)

Thread Thread
 
restoreddev profile image
Andrew Davis

I think they removed the telemetry because of bad press, but it’s still concerning it was added in the first place.

Collapse
 
pbouillon profile image
Pierre Bouillon

Same, that's completely unethical, thanks for the article, removing it too!

Thread Thread
 
math2001 profile image
Mathieu PATUREL

If feel bad for using this for self-promotion, but I made a lighter alternative to this plugin, which is called FileManager... Hopefully it'll suit your needs.

Collapse
 
tojacob profile image
Jacob Samuel G.

The conclusion is good. In my case, programming with javascript, VScode provides a complete experience.

Collapse
 
apatrid profile image
Mijo

I tried many editors/IDEs, but never left Sublime. ♡

Collapse
 
rioma profile image
Mario

As a PHP developer I am surprised that you favor Sublime over PHPStorm.

Collapse
 
restoreddev profile image
Andrew Davis

I tried PHPStorm, but I prefer more lightweight editors. Plus, I wanted to pay for an editor that I can use for more than just PHP.

Collapse
 
ns01 profile image
Eduardo Reyes

I'm 100% editor based, I've tried PHPStorm but it feels just to heavy for me. Even though I do agree PHPStorm is a great editor and I've got it installed and updated for when the need arises.

But 99.9999% of my time I'm using vim, the other .0001% I'm trying new stuff or learning about the progress of the main editors and IDEs.

Collapse
 
stilldreaming1 profile image
still-dreaming-1

Yeah, I use Neovim most of the time, but I use PhpStorm when I want to automatically do a large rename refactor. PhpStorm is impressively accurate and fast for renaming something everywhere it us used. It works well whether you are renaming a method, class, or even an entire namespace along with its' directory.

Collapse
 
ericmcwinner profile image
Eric McWinNEr

I actually really love PHPStorm. It's cool and it's just completely awesome. However I've found it's debugger very difficult to setup. I haven't been able to make one successful debug, although, most times, I can read through my code and find issues and it's syntax correction saves a lot of time, but I'd really like to see what's it's debugger can do...

Collapse
 
jwalzak profile image
Jason Walzak

I really like Sublime text. I bought it two years ago. Like you said it's fast.

There is just so many small QoL improvements on VSCode that I switched.

The integrated terminal, the sidebar like you said, Font ligatures (even though the newest version of Sublime has it)

None of these things are really mandatory, but I enjoy them enough for me to make the switch.

I am excited for the next version of Sublime to come out, I bet it's going to be really great. They will improve on all the great stuff from VSCode and Atom, and still make it fast.

Collapse
 
restoreddev profile image
Andrew Davis

I got the developer build of Sublime with font ligatures enabled and it’s really nice. I doubt Sublime will get an integrated terminal, but I already prefer using iTerm as a terminal emulator so that doesn’t bother me. I just want a built in debugger!

Collapse
 
adamcosi profile image
Adam

github.com/randy3k/Terminus

If you want a good terminal emulator the above is very nice, support for multiple shells, works with WSL... etc.

I use PHPStorm, Sublime and every now and then VS Code, often simultaneously.

Sublime is great for general hacking, scratch pad, logs and certainly more. It’s package ecosystem can put you on par if not decidedly beyond VS Code however the rise of VS Code has made it difficult to keep up with, that and you need to know Python to extend Sublime where as the plugin API for Code is more familiar to those with reasonable JS experience.

Sublime seemed to stagnate with a long time between releases/innovation at one point. Sleeping on the giants so to speak.

Sublime’s speed is unparalleled, that much is inarguable. It’s low footprint makes it hard to ditch entirely.

Collapse
 
mraza007 profile image
Muhammad • Edited

That’s the reason I switched to sublime too I used to use vs code too
Sublime is written in C++ and it’s faster compared to vs code since C++ is a low level language

Collapse
 
nelkorajkic profile image
Nel Korajkic

The only thing I dislike about VSCode might be something you hinted on with the symbol analysis. Within Atom I feel like the suggestions when typing are almost always exactly what I was looking for.

VSCode seems to have trouble with that, for example it won't even suggest a variable I had just defined one line above.

Collapse
 
auct profile image
auct

try phpstorm and i bet your next article will be why i switched from sublime to phpstorm :D

Collapse
 
restoreddev profile image
Andrew Davis

I’ve tried PHPStorm, it’s hard to adjust to after getting used to the speed of Sublime. I also did not want to pay for an editor I could only use with PHP, though I can see how the bigger feature set can help.