DEV Community

Cover image for Switching back to my old buddy Sublime Text from VS Code 🤷🏻‍♂️
Sarthak Sharma for XenoX

Posted on

Switching back to my old buddy Sublime Text from VS Code 🤷🏻‍♂️

Okay, this will be a really quick article. Up until just a few days ago, I was a VS Code lover like anyone else these days. I use to write a column of top VS Code Themes and Plugins every month in my monthly blog series "Ultra List" as well, but recently, I shifted back to Sublime Text.

Why? Let me tell you in this blog post.

Why? 🤔

So while we were working on a big old project, I observed something. Some of my teammates started complaining about their systems slowing down when working on that project. They complained about this often, and after a while, I just couldn't ignore the issue. So I decided to look into it, and I found out that the culprit was VS Code. When you work on big projects with lots of files, the folder structure starts looking like this.

folder structure for big projects

The problem starts here: the more files you have and the bigger your project, the more resources VS Code will start to consume. The Search Indexing and File Watcher scripts start eating up your memory. Moreover, to work on such a project, you will open each file in a new tab, leading to multiple VS Code instances running simultaneously, and eventually, your CPU usage will start to look like this.

CPU usage screenshot 1

CPU usage screenshot 2

If you have 4GB RAM, like some of my teammates, you can't code efficiently on a big project like this. And I can't tell my teammates to upgrade their RAMs. So the better approach for me was shifting to my old mate Sublime Text, see if it could help reduce the memory load on our machines without sacrificing general efficiency and important VS Code features we've all come to rely on, and then help my teammates set it up correctly. I am pleased to report that this was a successful experiment and I'm gonna stick to Sublime Text now, at least for the foreseeable future.

Check out its memory usage for the same workspace.

Sublime Text memory usage


How? 🤔

So if you think this is cool and could help your machine run lighter so you can code faster, stay with me and find out how you can achieve this too.

Once you install Sublime Text and Package Control, here is a list of plugins and themes that can help you to have the same experience you're used to on VS Code.

Plugins

1. GitGutter: It has everything that you need from a git plugin.
Gitgutter screenshot 1
Gitgutter screenshot 2

2. ColorSublime: It is possibly the best plugin out there for themes. This plugin can help preview a theme real-time, even if that theme is not installed on your Sublime Text at that time. 🤯

ColorSublime screenshot

3. Sublime​Code​Intel: Code completion like VS Code but way lighter.

4. SideBarEnhancements: Take your sidebar options to the next level with this plugin.

5. BracketHighlighter: Best Bracket Highlighter; matches a variety of brackets such as: [], (), {}, "", '', , and even custom brackets.

BracketHighlighter screenshot

6. PlainTasks: An opinionated to-do-list plugin for Sublime Text (2 & 3) editor.

Plaintasks screenshot

Themes

Now that you have the basics taken care of, it's time to personalize your setup. Check out these themes and give your Sublime Text a facelift.

Other Cool Stuff

If you want to explore further and see what more you could do with Sublime Text, go check out this AWESOME list. 📃

GitHub logo dreikanter / sublime-bookmarks

Sublime Text essential plugins and resources

Sublime Text Bookmarks Awesome

Sublime Text is a cross-platform text and source code editor, with a Python application programming interface. Its functionality is extendable with plugins. Most of the extending packages have free-software licenses and are community-built and maintained. — Wikipedia

This tiny project follows GitHub community trend to aggregate the most essential bookmarks for specific subject in the form of a handy well-structured collection. Here you will find tutorials and learning materials for Sublime Text, general purpose extensions for coding and text editing, and specialized extensions grouped by usage profiles.

This list not supposed to include absolutely all Sublime Text plugins, due we already have Package Control for this. It is intended to be a starting point helping to setup working environment, or check out for new extensions to make your existing Sublime setup more awesome. You may find ★ here and there in the list. It stands for Editors'…

It contains everything from useful books and community resources to plugins for specific profiles like JS, Python, and Ruby that could make your life much easier. You can also find some cool icon packs and fonts in there to customize the look and feel of your Sublime Text further. 🎨


Conclusion

And that's it for this post; short and sweet, just like I promised. That's my journey back to Sublime Text, a code editor I used for years before switching to VS Code. I'm really happy to discover that it's still amazing, better than ever in fact, and has a thriving ecosystem and community. Since switching back to it, I've seen a huge improvement in the productivity of my team, especially when working on big codebases. We've seen reduction in task completion times by as much as 60%, according to reports in our product management tool, ClickUp, which is awesome by the way and definitely worth checking out. So if you've been feeling done with VS Code and its memory-hungry tendencies, or if you simply want a change, go try Sublime Text and see the results for yourself.


One More Thing

If you're looking for work, we're hiring fullstack developers (MERN) at Skynox Tech! You can apply on Angellist, LinkedIn, or via direct email to info@skynox.tech. 😀💯

Ooh, and lastly, if you're already a Sublime Text lover and long-time user, please share your own experience and cool plugins and themes that I might've missed.

moonwalk goodbye gif

Top comments (173)

Collapse
 
deckchairlabs profile image
James Edmonds

I forget exactly what I needed to do to improve the performance, but while working in a large workspace I've often found the culprit is the file watcher service. You can add directories to exclude from intellisense, mainly node_modules and your build output directory. The only directory intellisense should care about is your source code. Doing so led to vscode becoming much more responsive. I might make a post about it once I've finished moving house...

Collapse
 
deckchairlabs profile image
James Edmonds

Looks like somebody beat me to it! dev.to/vaidhyanathan93/ulitmate-vs... main sections to note are the files.watcherExclude, files.exclude and the search.exclude, this may require customisation based on your setup, but you could also do this per workspace. Another tip is to disable extensions you don't need per workspace.

Collapse
 
lishine profile image
Pavel Ravits

There is problem with ubuntu regarding file watching with vscode, comparing to windows or mac. And excluded node_modules, but still I was forced to increase the limit in linux. I don't know, maybe causes some issues with cpu later...

Collapse
 
utkarsh profile image
Utkarsh Talwar

That's a good idea. A post to look forward to. 😃

Collapse
 
sarthology profile image
Sarthak Sharma

That would be a great idea James 😊

Collapse
 
x1k profile image
Asaju Enitan

please make a post about it, I found out VSCode is best for my Angular projects but old processor makes it a hassle

Collapse
 
sarthology profile image
Sarthak Sharma

Woho !! Things escalated real quick down there. Anyway, I agree with you completely Niels. But consider this a quick fix. Also few laptops were old enough that even upgrading ram couldn’t help (old processors). So, by adjusting in what they have and getting the best out of it, the short term solution can be shifting to lighter options but in long term buying a new laptop is a better option of course. 😊

Collapse
 
jdknox profile image
Jeff

My laptop from 7 (8?) years ago had 16GB of RAM. I'm not looking for a cookie or anything, but RAM should always be a priority for devs.

(Granted I was also doing 3D, but I think RAM should be a priority regardless. CPU and disk space are second class citizens.)

Collapse
 
bhupesh profile image
Bhupesh Varshney 👾

Sublime is my go to editor, never leaving it
plus VScode = electron = chrome = RAM Eating 😆

Collapse
 
sarthology profile image
Sarthak Sharma

Exactly!!

Hey Bhupesh, Do you mind sharing some plugins, themes, and Tricks here.

Collapse
 
bhupesh profile image
Bhupesh Varshney 👾
Thread Thread
 
sarthology profile image
Sarthak Sharma

Thanks man. JavaScript Completions is ❤️

Thread Thread
 
maxdevjs profile image
maxdevjs

It seems that Java​Script Completions has been replaced by JavaScriptEnhancements, being the former unmaintained nowadays

Collapse
 
jamesthomson profile image
James Thomson

I'd also add AdvancedNewFile to the list and Material Theme package.

Here's my customised preferences incase you're interested:

{
    "binary_file_patterns":
    [
        "node_modules/",
        "public/",
        "vendor/",
        "*.jpg",
        "*.jpeg",
        "*.png",
        "*.gif",
        "*.ttf",
        "*.tga",
        "*.dds",
        "*.ico",
        "*.eot",
        "*.pdf",
        "*.swf",
        "*.jar",
        "*.zip",
        "*.chunk.*"
    ],
    "bold_folder_labels": true,
    "color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme",
    "font_size": 12,
    "highlight_line": true,
    "ignored_packages":
    [
        "Vintage"
    ],
    "indent_guide_options":
    [
        "draw_normal",
        "draw_active"
    ],
    "indent_to_bracket": true,
    "line_padding_bottom": 3,
    "line_padding_top": 3,
    "overlay_scroll_bars": "enabled",
    "show_tab_close_buttons": false,
    "tab_size": 2,
    "theme": "Material-Theme.sublime-theme",
    "translate_tabs_to_spaces": true,
    "use_simple_full_screen": true
}
Collapse
 
thomas_ph35 profile image
Thomas Philippot

Totally agree, I was feeling some perf issues on webstorm when i was running a VM.
The first thing I did was a RAM upgrade, now I run 16GB and it's smooth again.

I enjoy webstorm so much I don't know how I would do without it !

But it's still nice to know that getting SublimText can be a quick fix.

Collapse
 
sonnk profile image
Nguyen Kim Son

I am also a sublime text lover but it’s true that vscode is doing some stuffs far better than sublime. At the end I just use them both, sublime mostly for exploring code (read only) and vscode for a more intensive code editing (and pycharm for advanced stuffs :) ).

Collapse
 
utkarsh profile image
Utkarsh Talwar

With the right extensions, I think Sublime Text can be pretty powerful. We've made sizeable, production-ready projects on it in the past. Of course, VS Code has some feature advantages over it, but still Sublime Text is pretty capable imo. 😄

Collapse
 
sonnk profile image
Nguyen Kim Son

Yeah that's another imperfect thing about Sublime: it doesn't work great out of the box. That being said installing extensions is quick and we just need to do that once.

The VS killer feature for me is the debug & breakpoints though, being able to inspect quickly and visually while debugging speeds up a lot the workflow IMO.

Collapse
 
rolandcsibrei profile image
Roland Csibrei

I am running into the same problem with my Surface laptop 2 with 8 GB of RAM and an i7 CPU, so it's not a third world problem as Niels was trying to state. Thanks for the article and for the response though! But have to tell, Niels is right, working professionally and do not have the basic tools seems to be contraproductive and ridiculous...

Collapse
 
x1k profile image
Asaju Enitan

same here
8gb RAM, core i7, but the laptop is pretty old and I am not in liberty to purchase another one so a quick fix is something I'd love to switch to

Collapse
 
vonheikemen profile image
Heiker • Edited

Sharing is fun. Here I go.

Plugins

  • AceJump: Allows you to move the cursor to any character to any place currently on screen.

  • Origami: Better split pane control.

  • FileManager: Manage your files without using the sidebar.

  • NeoVintageous: Vim emulation.

  • Requester: HTTP client for Sublime Text 3.

Themes

Collapse
 
pratik149 profile image
Pratik Rane

Thank you! FileManager worked for me. Just enough options. Seems better than SidebarEnhancements which is just too much.

Collapse
 
andrasfelfoldi profile image
Felföldi András

I had the same issue when I was working on my React Native hobby project called Sudoku Mobile (shameless plug here).

My laptop almost became unusable and my battery was draining very quickly. I switched to Atom (another Electron based app :D) for the project and I didn't have this issue anymore, but I really missed VSCode.

Collapse
 
sarthology profile image
Sarthak Sharma

Atom is also good. You may wanna share some resources for it ?

Collapse
 
andrasfelfoldi profile image
Felföldi András

I don't really know about any good stuff for atom as I didn't use it much in the end. I went back to VSCode within a few days and tolerated the performance issues. Atom couldn't property comment JSX at the time (for me at least) and that made me switch back.

 
moopet profile image
Ben Sinclair • Edited

It's likely that buying another 4GB is cheaper than buying Sublime Text. I picked up a 2GB stick from my local CEX store the other day for £1. I do realise that's different depending where you live.

 
mburszley profile image
Maximilian Burszley

That's not an apology. "sorry you're offended" is never an apology.

Thread Thread
 
ninjabunny9000 profile image
💾 bun9000 • Edited

Exactly. It’s specifically called a non-apology. en.m.wikipedia.org/wiki/Non-apolog...

Try not to do this in a professional environment, folks! It happens a lot which is why I mention it, and it’s a huge problem... Especially if you’re “calling someone out” for responding to criticism in a way you don’t like. It just adds fuel to the fire.

It’s something most people do without realizing it. Try and take a few moments before responding with “apologies” to see if you might be giving a fauxpology because, chances are, you’re response could escalate things. And if you’re entire point is to comment on how someone is already escalating things... Well, you can see the cycle.

Thread Thread
 
thomasredstone profile image
Thomas Redstone

No, they realise.

Thread Thread
 
mburszley profile image
Maximilian Burszley

Apparently so since they deleted all of their comments.

Collapse
 
opshack profile image
Pooria A

What if you have only a 2015 MacBook Air with 4GB RAM? Is it still cheap to upgrade? I assume this mentality that if it's cheap for me then it's cheap for everyone is what stops many developers like you to build experiences suitable for all users (e.g people against accessibility, React concurrent mode etc)

Collapse
 
moopet profile image
Ben Sinclair

I would like to make the hasty generalisation that if you're driving a MacBook, money is not an object in the first place.

Thread Thread
 
opshack profile image
Pooria A

Upgrading to a new MacBook is always a big purchasing decision. Can I afford it? Yes. Do I want to while my 2015 MacBook is working fine? No!

Anyway I'm not really talking about myself. I do web development and I'm running mostly nodejs apps in CLI. My VS Code is working pretty smooth. I'm just arguing that the mentality to expect users to upgrade to support un-optimized apps is wrong.

Thread Thread
 
rhymes profile image
rhymes

@moopet I think that's also a general assumption we shoudn't make. I bought my first Macbook with Google Summer of Code's money during uni. I wasn't wealthy, at all :-)

People are also allowed to save for the things they want, we shouldn't judge them.

The point here is that software shouldn't be slow, it's not "hey, who cares, upgrade your computer"

Thread Thread
 
mikeschinkel profile image
Mike Schinkel

We shouldn't judge people for living their lives how they want to live them — as long as they are ethical and following the law — but when someone works in a profession then by all means we can judge them for their level of professionalism. A professional developer choosing to work on a computer with only 4GB RAM is just unprofessional.

Now I get that different parts of the world computer costs are a larger percentage of income and I empathize, but if a person is a reasonable developer their incomes can be much higher relative to many others in their region, and good professionals should invest in good tools.

Put another way, I hire freelance developers to work on projects for my company. If I found out that someone was switching to Sublime (instead of using PhpStorm) because they only had 4GB of RAM In their computer, I would be unlikely to hire them unless I determined that it was chicken-and-egg problem; e.g. that they would invest in a better computer but first needed the income to get them there. And I have actually hired someone who did exactly that, and now he works on a state-of-the-art computer, because he is a professional.

But a team of developers where many only have 4GB ram? That sounds like a recipe for a disastrous codebase.

Thread Thread
 
moopet profile image
Ben Sinclair

I don't think 4GB is unprofessional per se, it depends what you're doing with it.

It's plenty for a lot of work: I've just logged onto my home dev box and checked, and it's got 6GB, is running hugo and gatsby servers and a couple of Vim instances in tmux.

And out of that 6GB? 5 of it is currently unused. You might say that's because it's headless, but it is what I use for personal development :)

Thread Thread
 
mikeschinkel profile image
Mike Schinkel

You are talking apples and oranges. The discussion was about not being able to use a quality IDE on the desktop because of only 4GB RAM. An SSH target is a different fruit entirely.

Thread Thread
 
moopet profile image
Ben Sinclair

You're right, but the conversation seemed to have moved on to "professional developer" with no further qualification.

Thread Thread
 
mikeschinkel profile image
Mike Schinkel

For clarity then, I was assuming the original context of the conversation when I commented my opinion that developers sticking with 4GB by choice was unprofessional.

Collapse
 
kayis profile image
K

I'm planning to switch to github.com/cdr/code-server

I'm already using AWS Cloud9 for cloud development because everything on its EC2 is configured like the production environment and it works from all machines.

But I prefer the usability and extensions of VSCode, so I'm not too happy with C9.

Since MS is offering VSCode remote via Azure already I think it will get better in the future. Meaning, most of the "hard" things will be done on the server, allowing me to just provisioning a bigger machine if things get out of hand.

Let's see how this goes :)

Collapse
 
sarthology profile image
Sarthak Sharma

I was planning to do that too. Do share your learnings.

Collapse
 
fyodorio profile image
Fyodor

Yes, please, K!

Collapse
 
jaakidup profile image
Jaaki

Nice article.

Yes, I've also found that VSCode has really become a memory hog.
My one 10year old laptop has 4GB Ram and my one 10year old desktop has 6GB Ram and not planning to update them but rather replace them sometime.

So I see myself switching to Sublime today and I'll give those plugins a try. Thanks

Collapse
 
sarthology profile image
Sarthak Sharma

Don’t forget to come back and share your finds as well. 😊

Collapse
 
lawrencejohnson profile image
Lawrence

Putting developers on workstations that have only 4GB of ram is like making a carpenter work with stone tools. If you want professional work, you must supply professional tools.

Collapse
 
sarthology profile image
Sarthak Sharma

That's quite the privileged perspective, Lawrence. I know plenty of people who begin coding on computers with 4 gigs of RAM. "Professional work" is very subjective. I started coding on a 4GB laptop myself and only upgraded my RAM much later in my professional career, and I've done plenty of "professional work", trust me.

The point of this post is to give people options, not get into a flame war about how much memory is enough for development.

Collapse
 
lawrencejohnson profile image
Lawrence

I'm not flaming you or developers; this is a note to employers.

Collapse
 
robboclancy profile image
Robbo

I'm honestly dumbfounded someone would even accept working with 4gb ram. Chrome and the os will use most of that before you even do anything. Wtf. They are wasting so many man hours waiting for things to process for sure. Including the hours looking into why something is slow when they are on hardware that sounds a decade old. The reason it is slow is because the computer is slow...

Collapse
 
rhymes profile image
rhymes

The reason it is slow is because the computer is slow...

Yes, the computer is slow for today's standards, but the author literally demonstrated how changing to a different IDE (that's currently developed and popular, have been since 2008 and it's just written with a different technology, C++ and Python) enable those users to have a fast developer experience again.

Doesn't this tell you anything about slow software? :)

Thread Thread
 
lawrencejohnson profile image
Lawrence

Would you refuse to play any game that was made after 2012 because the newer graphics made it slow on your computer from 2008? Saying that modern tools need to be fast on old tech is to reject the fundamental building block structure of all human technology. In other words, that is a very flawed loaded question.

Thread Thread
 
robboclancy profile image
Robbo

Yeah I have no doubt in my mind at all that they are going to have slow experiences again when using it because they leave a single tab too many open in Chrome. They lose productivity learning a new tool and one that they probably liked more too because they are on hardware that has worse specs than the phones in their pockets.

Thread Thread
 
rhymes profile image
rhymes • Edited

I think you misunderstood me, or, which is more likely, I wasn't clear myself.

I'm not pretending that, let's say, Windows 10 has to work on a 90s PC. The author of the post, myself and other people basically illustrated that there are tools that are still relevant, Sublime Text in this case, that work well with older computers (and obviously newer ones) without sacrificing the developer experience (or to be clearer, the experience of the developers that use the IDE).

VSCode is a terrific product and the team at Microsoft should be applauded, they were able to create such a good product around a platform that has been known since the beginning to be a memory black hole. The reason why Electron is still popular is because it offers a tradeoff: more resources occupied for a faster and better developer experience (in this case, the developer who create platforms, VSCode itself).

It's a choice, it's not mandatory.

Writing an IDE is a hell of time and resource consuming choice for any company or solo developers, especially now that VSCode has eaten most of the pie. But that doesn't mean it can't be done in a better way, where better is probably subjective at this point :)

Since the tech world is not a monoculture, or at least it shouldn't be, thankfully there are multiple choices, some that occupy more resources, some that occupy less, some that have a bigger community, some that don't, some that are open source, some that aren't. Vim for example is still extremely relevant today, but has been around since the dawn of time, is that old technology? Yup. Do we care? I'm not a Vim user but I wouldn't if I were.

It's probably way more complicated to contribute code to Vim than it is to contribute code to VSCode, but this is also the result of a choice. They chose (well, back then they probably had to) a technology that's harder for the people who create the platform but allows them to distribute the result on all types of computers.

Going back to my distaste for slow software, it's still about that choice that I just mentioned. I've never said that I'm against modern technology nor I think VSCode is particularly slow.

BUT

the point is the product, how much we really need it (and need is super subjective because I could technically develop with Emacs in the console like I used to do for years) and how it helps my user experience. If the product on paper is great but I spend the day looking at htop, probably that "great" is relative. After all, if we want to be annoying, these are the system requirements for VSCode:

We recommend:
1.6 GHz or faster processor
1 GB of RAM

taken from their official website code.visualstudio.com/Docs/support...

and they are way well under the capabilities of the computer the author was referring to.

Games are an all in. If I want to play "Random game TM" and my system specs are not up to it I'm left with two choices: invest into a more capable computer (or faster upgrades) or not play the game at all.

Games are literally the benchmark on which video cards R&D is done. It's an industry that fuels itself. There are new advancements, those advancements are used by the latest games and those games are used as a benchmark to improve 3D rendering or such.

VSCode is just an IDE, let's not forget that :)

Collapse
 
seanmclem profile image
Seanmclem • Edited

My cheap and underpowered laptop at home has 8 GB of RAM. Developers seem to usually think that that's too little these days, but it can run easily 10+ VS code sessions, each with dozens of tabs open, each with several terminals running, all with corresponding Chrome windows that also have dozens of tabs open. I never experience any slowdowns. Ever

Collapse
 
x1k profile image
Asaju Enitan

did you build this laptop yourself?
if so, please do share the details or the name of the laptop

Collapse
 
seanmclem profile image
Seanmclem • Edited

Off the Shelf. Got it on Amazon 2 years ago.

ASUS UX360CA-AH51T
CPU Core i5-7Y54
RAM 8GB

Collapse
 
lishine profile image
Pavel Ravits

What os?

Collapse
 
seanmclem profile image
Seanmclem • Edited

Windows 10

Thread Thread
 
utkarsh profile image
Utkarsh Talwar

Damn. Can't believe you're getting this kind of performance on your machine with Windows 10. Any specific tweaks you've done? Mine is 4y/o with 8GB RAM and Core i5-5200U. I don't get anywhere near that kind of performance.

Thread Thread
 
seanmclem profile image
Seanmclem • Edited

The only specific thing I've really done is - I don't use it for anything other than development. I don't install or run anyting for any function other than writing code and running it

Thread Thread
 
drazendotlic profile image
Drazen Dotlic

Exactly! People seem to forget that there "may" be other things running on the computer, not just our IDEs. Except if we make it only run our IDEs and runtime environments (say, browsers) then things aren't so bad.
My (macOS) machine has plenty of RAM which is mostly used by my non-development related apps, almost all of which are Electron based because I don't like using different tooling when I use Windows. When I do run Windows, which is in a VM configured for 8GB of RAM, I only run development stuff and what-do-you-know, no problems with memory.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.