Monthly Archives: June 2013

The Tools Of My Trade – Sublime Text 3 & Tern

toolbox-1In an article I wrote a while back, I expressed what every developer knows (or should know) which is the importance of choosing the right development tools. In that article I also stated my appreciation for WebStorm, which is a light-weight but full featured JavaScript/Web IDE from JetBrains. Now I’d like to touch on another subject that I raised in that article but never expanded upon, which is using a standalone text editor for JavaScript/Web development.

My favorite text editor of all time is Vim. It is dear to my heart and almost as old as I am (not quite lol). I use it for all sorts of editing but I’ve never liked using it for editing code. Call me muscle-memory challenged but I want my code editing tools to provide me with intuitive code completion. WebStorm shines in this area and does so because it actually indexes all the symbols it finds in your project files. Editors, for the most part, don’t do that. But…. enter Sublime Text 3 and Tern.

Sublime Text 3, while still in beta, is stable and even faster than its predecessor. Most importantly, though, it now indexes the symbols in your project’s files and uses the index to support project-wide symbol searching. This is a vast improvement over Sublime Text 2. But wait, that’s not all. Then there’s Tern. For those of you who might not have heard about Tern, all I can say is go to the link above and read up on it. It is an incredible asset when coding JavaScript and now there are 2 Tern plugins for Sublime, this one and this one. Sublime Text 3 along with Tern makes for a near perfect stand-alone text editor for JavaScript development.

I say near perfect because Sublime Text 3 still cannot format HTML and code to save its life and its attempt at Vim support via Vintage mode leaves me wanting more – a lot more – and while Vintage mode is better than nothing at all, I desperately wish that Sublime’s developer would set about matching the Vim emulation found in WebStorm. No, I am begging him – please make Vintage mode equal to or better than that in WebStorm. I can’t promise him fame or fortune but I can promise him that he would have earned a special place in every Vim lover’s heart. Oh, and if he could also make Sublime format HTML and JavaScript in a sanely manner then that would be greatly appreciated as well :).

But even with its short comings and challenges, there is in my opinion no other stand-alone editor that can even come close to Sublime Text 3, especially when teamed up with Tern. I love it and to prove my love I purchased a license a few months back to show my support and appreciation and I encourage everyone to do the same, especially if you have been using Sublime regularly.

As a side note to all this love and admiration for Sublime Text 3 and Tern, I am a little concerned about the number of Sublime Text plugins that are still not yet compatible with Sublime Text 3 or are not yet discoverable through the package manager. I hope that the pace will pick up and that Sublime’s thriving eco system will continue to enrich what is already an outstanding editor.