Why I Switched From Visual Studio Code to Sublime Text

Profile Picture
Andrew Davis
Jan. 25, 2018 • 5m 6s
webdev
php
productivity

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!