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!

Latest comments (78)

Collapse
 
webgiftdev profile image
Stratakis Stavros

I am a PHP developer as well and i do prefer sublime text over VS Code! I don't think that we are the two of us @restoreddev :)

Collapse
 
yafetissac profile image
yafetissac

Already Solved This Error At icetutor.com/question/visual-studi...

Collapse
 
yafetissac profile image
yafetissac
Collapse
 
shrinidhi99 profile image
Shrinidhi Anil Varna

Nice article.

Collapse
 
warfares profile image
Rodolfo ☠️

Love the golang support of visual studio code.... which include interaction with a debugger... the terminal is also something that I really appreciated.... however... I don't feel comfortable with electronjs apps..., I also switched back to Sublime text...

another simple text editor is Gedit.... in case you are over Linux/gnome.

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
 
kieranaomi profile image
Kiera Naomi

Hi there,

This is a very naive question, but I am completely new to the coding world, and I am trying to switch over from Sublime Text to Visual Studio code. Is there a way I can move the scripts and data I've collected from ST over to VSC, without messing anything up?

Thank you so much!

Best wishes

Collapse
 
henrydavidzhu profile image
Henry Zhu

Agreed. I used to use Visual Studio but I have since fully switched to Sublime Text. It just feels so smooth and easy to use when you're programming.

Collapse
 
dinolatoga profile image
Dino Latoga

Tried both and I ended up going back to Sublime Text 3 only because it's faster. Only downside is that ST3 is too expensive.

Collapse
 
justageek profile image
Brian Smith

Not sure about anyone else, but on my Macbook (about 4 years old), it vs code kills my cpu every time it does its indexing. And, I rely heavily on PHP CS, which runs on every keystroke, without a config option of "lint on save only". I also tried IntelliPhense, which crushes my cpu and locks up the editor. I wonder if building on top of Electron is a good long-term solution, I don't really know, I'm just curious more than anything.