Hello Sublime Text, my old friend
Tags: javascript, typescript, webdev
Published: 2020-09-14 19:11:04

![Sublime Text](https://dev-to-uploads.s3.amazonaws.com/i/ig02x6tyoogc79hvd14n.png)

It’s  been a long time since I used [Sublime Text](https://www.sublimetext.com/). I’ve quit on version 2 and used Atom at first. Visual Studio Code followed soon after and I used it for some years. It was nice for some time, but those Electron Apps annoy me ever more. They are very memory hungry and my old Mac doesn’t provide endless amounts of it. Time to revisit Sublime!

### What’s the current state of Sublime?

The current version of Sublime Text is 3 and there is an even faster version 4 in development right now. Great to see this project still making progress! So I purchased a license and started to try out version 4. That dev version is pretty stable already — just as I remember it! You can get version 4 from their [Discord](https://discord.com/invite/HcmwdVK).

### Code Intelligence

Coming from Visual Studio Code, I got used to the code intelligence a lot. I was very happy to find out that this is due to the Language Server Protocol (LSP) which is now also available for Sublime Text! Nice! Code completion, references and — most importantly — refactorings are possible, just like in VS Code.

![LSP giving suggestions to autocomplete.](https://dev-to-uploads.s3.amazonaws.com/i/gfgppn6u2b9gw616dals.png)

![LSP providing information on the signature of a function.](https://dev-to-uploads.s3.amazonaws.com/i/2nev4kzc098to784gcnb.png)

### Extensions I use

Sadly it’s not as pretty and usable right after installing it — you have to get some extensions (called packages here) to add the functionality.

I do mostly web development in JavaScript / TypeScript, so these are the extensions I use:

* [A File Icon](https://packagecontrol.io/packages/A%20File%20Icon): file icons for the sidebar
* [AutoFileName](https://packagecontrol.io/packages/AutoFileName): autocomplete file names
* [ayu](https://packagecontrol.io/packages/ayu): my theme choice
* [Color Highlighter](https://packagecontrol.io/packages/Color%20Highlighter): underlay hex colors with their real color
* [DocBlockr](https://packagecontrol.io/packages/DocBlockr): Simplify DocBlock writing
* [EditorConfig](https://packagecontrol.io/packages/EditorConfig): respect `.editorconfig` files for a consistent coding style
* [FileManager](https://packagecontrol.io/packages/FileManager): improved file handling
* [Git](https://packagecontrol.io/packages/Git): basic git integration
* [HTML-CSS-JS Prettify](https://packagecontrol.io/packages/HTML-CSS-JS%20Prettify): prettify a lot of files
* [HyperClick](https://packagecontrol.io/packages/HyperClick): click to jump to a file
* [JavaScript Console](https://packagecontrol.io/packages/JavaScript%20Console): `console` snippets
* [JsPrettier](https://packagecontrol.io/packages/JsPrettier): prettier formatting support
* [LSP](https://packagecontrol.io/packages/LSP): the Language Server Protocol that gives us code intelligence
* [LSP-typescript](https://packagecontrol.io/packages/LSP-typescript): extra TypeScript support for the LSP
* [MarkdownEditing](https://packagecontrol.io/packages/MarkdownEditing): improved editing view for Markdown
* [Nodejs](https://packagecontrol.io/packages/Nodejs): Node.js snippets and bindings
* [Stylus](https://packagecontrol.io/packages/Stylus): support for the stylus CSS preprocessor
* [SublimeLinter](https://packagecontrol.io/packages/SublimeLinter): adds linting to Sublime Text — linters need to be installed separately. I installed SublimeLinter-annotations, SublimeLinter-contrib-dockerfilelint, SublimeLinter-contrib-rustc, SublimeLinter-contrib-yaml-lint, SublimeLinter-csslint, SublimeLinter-eslint, SublimeLinter-json 
* [SVG Preview](https://packagecontrol.io/packages/SVG%20Preview): preview SVG files
* [SyncedSideBar](https://packagecontrol.io/packages/SyncedSideBar): sync project sidebar with currently active file
* [TypeScript](https://packagecontrol.io/packages/TypeScript): extra TypeScript support

### Git integration

Since when I quit Sublime there is a new program called [Sublime Merge](https://www.sublimemerge.com/). It’s a power Git client that can be opened out of Sublime Text. One click repo handling and it doesn’t even use resources when developing as it doesn’t need to hang around open all the time.

![Sublime Merge showing a commit diff.](https://dev-to-uploads.s3.amazonaws.com/i/7ldi3myye6im58e7f3tl.png)

### What’s missing?

The only thing that annoys me currently is the click-to-go-to-definition. It opens a list with all files that have a reference to that function. But in like 99.9% of cases I want to go to the definition, not somewhere else. Maybe I’ll find out how to tell `goto_definition` just that one day.

### Give it a try!

You can evaluate Sublime Text for an unlimited amount of time, so just download it and play around. It’s fast and has a minimalistic interface. I’m glad I came back.