DEV Community

Andrew Davis
Andrew Davis

Posted on • Updated 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!

Top comments (81)

Collapse
 
rioma profile image
Mario

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

Collapse
 
eduardort 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
 
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
 
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
 
woodywoodsta profile image
Sean Wood

TL,DR; VSCode was just not developed with primary support intentions for PHP.

Having worked with the Big Three (Sublime, Atom, VSCode), I can say that VSCode along with some extensions have proven the best for Node.js and front end web projects.

You ever tried writing a plugin for Sublime Text? Ha ha ha 😂

Collapse
 
lexlohr profile image
Alex Lohr

Actually, I have written an extension for Sublime Text. While the documentation of the python API leaves some things to be desired, it's not too difficult.

I have also contributed to a few VS Code extensions. For someone whose main language is JS/TS, it's definitely easier.

Collapse
 
restoreddev profile image
Andrew Davis

If I was doing more TypeScript or React, VS Code would be really appealing. It will become the standard editor for JavaScript frameworks.

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
 
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
 
apatrid profile image
Mijo

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

Collapse
 
bdwakefield profile image
Benjamin D Wakefield

The issue here is that Sublime is more "Text Editor Plus" and VS Code is "IDE Lite". They aren't exactly comparable; at least not the way people seem to want to IMHO. One is a text editor the other is not.

The quality of life you get with VS Code is something I don't think enough people put enough thought/stock into.

Bottom line is use what you want to use; what works for you. We really should stop trying to directly compare VS Code to Sublime. They are both VERY good tools but they definitely are not the same "class" of tool.

Collapse
 
restoreddev profile image
Andrew Davis

I don’t think any editor is exactly comparable because they each have their own goals. However, most developers pick one to use the majority of the time they are coding. In that sense, Code and Sublime are comparable and it’s important to write about strengths and weaknesses of each so programmers can decide for themselves what they want to use.

Collapse
 
loilo profile image
Florian Reuschel • Edited

I actually use both editors. Sublime Text for quick notes and snippets and for basically all hotfixes when I roughly know what I have to do in which file (subl . just is really fast).

I prefer VSCode in JS-heavy code where I need data from the project context (a task Sublime Text rather sucks at).

However, I have to agree with you that Sublime Text is by far the best jack-of-all-trades text/code editor out there. 👍

Collapse
 
oneezy profile image
Justin O'Neill

I recently switched from VScode to Sublime too.. and I REALLY REALLY REALLY didn't want to do that. I've been using VS code for about 2 years now and have really gotten use to it.. but the lack of speed made it impossible to work with. Maybe when I get a better computer it won't affect my workflow..but as of now, Sublime beats VS code 100x in performance. It hurts to say that but it's the truth

Collapse
 
cschliesser profile image
Charlie Schliesser

I feel you. I kind of hate the surge in Webkit / Electron apps. They lack the simplicity, speed, and responsiveness of native apps' UIs, scrolling, etc. I totally understand the need, but I'm much happier in apps like Paw and SequelPro than say Slack.

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
 
fbnlsr profile image
Fabien Lasserre ☕️

I've been trying to go back to ST3, but VSCode is simply superior overall in my book. The startup time is a non-argument for me. I can wait two seconds for my editor to open, and the rest of the time, it's fast enough so I never complain.

Besides, Microsoft is doing an amazing job with this editor, and I'm confident the burden of Electron will fade away with time.

Collapse
 
restoreddev profile image
Andrew Davis

If the speed of Electron catches up, then it Code will be really hard to beat.

Collapse
 
the_fln profile image
Francois Lanthier Nadeau

Andrew!

Thanks for that piece. Helped and inspired us to work on our own, based on our devs' experiences with both VS Code & Sublime, with a focus on JS development:

Teardown: Visual Studio Code VS Sublime (JavaScript Focus)

Cheers!

Collapse
 
aoenth profile image
Kevin Peng

I strongly resonate with your findings in this article. First thing I do for evaluating any text editor is to see if it support Vim bindings. When I came across Sublime Text and Vintage Mode, I am stuck with it. Although Visual Studio Code's Vim plugin is not bad, but the speed and responsiveness of Sublime Text is unmatched. Thanks for the great read!

Collapse
 
arvigeus profile image
Nikolay Stoynov

Vim: marketplace.visualstudio.com/items...
Based on a guy who also refuses to switch to VSCode because of this (twitter.com/kentcdodds/status/9897...)

Sublime is faster? Sounds correct on paper, but in reality it struggles with very large files where VSCode opens them in seconds. Tried a 500MB text file today. I don't know what MS are doing, but if we lived few centuries back, people would burn them for using black magic.

Collapse
 
lexlohr profile image
Alex Lohr

I switched from Sublime (which I loved so much that I bought it) to VS Code when it was released first and back after a few days. Like you said, it is fast, has a rock solid feature set and works great. However, if you want some advanced functionality, you need extensions, which are written in Python. I even wrote an extension myself to help my work. Still, Python and the bridge between those languages is obviously slower than a 100% C++ app.

In any case, the second time I tried VS Code, I found a whole new pleasant experience, with a lot of integrated features and a vital ecosystem surrounding it. However, I'm writing more JavaScript/TypeScript than PHP, so VS Code is probably more aimed at me than it is at you.

Collapse
 
restoreddev profile image
Andrew Davis

Definitely agree. VS Code has a heavy focus on JavaScript and will mostly become the standard for JS development.

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
 
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
 
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.