Migrating from VS Code to Sublime Text in 2022
Tags: sublimetext, vscode, ide, webdev
Published: 2022-02-16 18:59:35

VSCode needs no introduction as it is probably the most popular IDE/code editor at the moment. It has many useful built-in features as well as tons of 3rd party extensions in it's marketplace.
It is maintained and regularly updated by Microsoft and has a vibrant community of users and developers.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ijfznj8xwtejispb9chv.png)
 

However VSCode has a dark side to it... No, I'm not talking about Microsoft [harvesting your data](https://code.visualstudio.com/docs/getstarted/telemetry) for their nefarious purposes (although that's certainly an issue in my opinion). What I am referring to is VSCode's comparatively sluggish performance and the strain it puts on the computer's resources.

Although Microsoft did an amazing job of optimizing and squeezing every last bit of performance out of Electron, there's no getting away from the fact that VSCode will always be at a disadvantage compared to other code editors written in more low-level languages.

Also, and this is obviously more of a personal preference, I find VS Code's design and layout to be a bit too "busy" for my tastes as I prefer a more clean and minimalist UI with less distractions.

Fortunately, as you'll soon see, there are alternatives. But first a couple of small caveats:

1. VSCode is great! No, really. It's not my intention to bash it or any other editor/IDE for that matter.
The fact that it's free and mostly open source should be celebrated.
Beside the above mentioned reasons, using VSCode is also the path of least resistance. Speaking from experience, it is super easy to set up and be productive with in no time. This is especially important for novices as almost any other tool will require you to put in some extra effort into setting it up.
However, if you're the type of person who enjoys maintaining and fiddling with your tools this guide might just be for you.

1. I am a full stack web developer working mostly with Node.js, React and Typescript. This setup is what works best for me, but may not work as well/at all for you. Having said that, many of these ideas and concepts will translate well into other languages and paradigms.

With these out of the way, let's move on and see why I chose to use Sublime Text and how I set it up as a powerful alternative to VSCode.

# Sublime Text
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8eluprnut8e52c46ocfs.png)
 
Sublime is a closed source code editor written in C++. It also has a python API which can be used to extend it with additional functionality.

It's not free software, but you can "evaluate" it indefinitely if you don't mind the occasional popup window. 
However, if you enjoy using it and can afford it, I highly recommend to buy a license and support the developers.

Although, not as popular as VSCode it has a [devoted](https://twitter.com/dan_abramov/status/1488956873390923780) following and plenty of packages on it's marketplace called [package control](https://packagecontrol.io/)

In my experience, any sufficiently popular extension for VSCode will sooner or later be ported to Sublime (and vice versa).

Sublime is a fast and capable code editor, able to handle large files with ease, but it is still "just" a text editor. Let's see how we can turn it into more of an IDE.

### Intellisense and Diagnostics
Luckily for us, the same autocompletion engine that powers VS Code is available to us in sublime through the [LSP](https://lsp.sublimetext.io/) family of plugins.
To make a long story short, the Language Server Protocol is a protocol that standardizes the way code editors communicate with compilers through language servers.
Install the language servers relevant for your setup (for me it's `lsp-typescript`, `lsp-css`, `lsp-json` and a `lsp-tailwindcss`) and you'll be rewarded with powerful autocompletions, helpful diagnostics and excellent developer experience. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ln4o4clhod4xszq4ybm9.png)
 
### Linting
While sublime has a dedicated [linter plugin](https://packagecontrol.io/packages/SublimeLinter), you may not need it. Both `eslint` and `stylelint` have language server plugins. This way all your errors will be shown in the same place.

![LSP Modal Window](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j2jsnfu2q97fk7l9xu48.png)
 
### Prettier
Simply istall the [JsPrettier](https://packagecontrol.io/packages/JsPrettier) plugin and you're all set.

### Terminal
While sublime does not have a built-in terminal the [Terminus](https://packagecontrol.io/packages/Terminus) package steps in to fill the gap.

![Terminus](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h22ayxbe40e939o5xbr2.png)
 

### Debugging
The [Debugger](https://packagecontrol.io/packages/Debugger) plugin implements `Debug Adapter Protocol` or DAP, allowing you to debug your code without leaving sublime. While not as refined as VS Codes's debugger, it is functional and receives frequent updates.

![Debugger in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xg9e2160ao6uwj2bzwuz.png)
 

## Conclusion
Although this is a short guide, I hope it gave you some idea of Sublime Text's capabilities and how it can be set up to maximize your productivity and accommodate your daily workflows.