My Cordova & Ionic Toolchain - Code Tools - Part 2: Sublime Text

I had several close contenders for this. Small hint, it ain't visual studio.

Why not you may ask? Visual Studio is hands down is one of the best, if not the best IDE on the planet. However, with the dynamic nature of JavaScript, Visual Studio's code ais does not help that much. Furthermore, Visual Studio is very much a multi purpose tool and with that, it has a lot going on and thus makes it a slow tool.

I wanted something lean, mean and focused. I thus turned towards the oldest form of development tool, a spruced up text editor, a code editor. Thus began my journey.

A natural choice would be something I used a lot. Sublime Text 3, that is. A little bit of a segue, I actually make a point to write my C# code in a text editor as a form of practice. I wanted to write code without any safety belts and the butler known as an IDE. Sublime Text 3 filled that need well, I always felt the developer should drive the development, not the tool. Anyway, back to the topic.

What drew me to it was the following:

  1. It is free.
  2. Very fast load time, its a text editor.
  3. Great plugin support.
  4. Folder driven, need to have silly project metadata files to create a project.
  5. Split editing like an IDE. Code files side by side and refer to both simultaneously. Code files are usually intertwined and we will end up referring and making code changes to at least two files at the same time. Code split screens are really good.
  6. What they call code palette, everything can be done purely via keyboard when it comes to editing code. To quote them "The Command Palette holds infrequently used functionality, like sorting, changing the syntax and changing the indentation settings. With just a few keystrokes, you can search for what you want, without ever having to navigate through the menus or remember obscure key bindings."
  7. The ability to open files via keyboard within the the project. No need to use the mouse for that bit of jiggery pokery. Visual Studio can do that with ReSharper installed but not out of the box.
  8. Multiple targeted selections to change things, makes code edits very fast. I don't mean the blanket string replace but something a lot more targeted. Hard to explain, you got to try it to know it.
  9. The thing on the right that gives visual queues on where you are, what strings you have found in your search, etc.

Sublime Text

Using it was great with Cordova/Ionic Framework. I can automate a lot of things with the highly extensible build configuration and automation tool. Those that I am too lazy for, I can always use a command line.

What about code aids? Well it is sufficient. It is smart enough to pick up on the function and property calls that you have used and add it to its auto completion box. This is JavaScript, its dynamic, prototype based nature does not lend itself well to a good auto completion anyway.

The HTML bits can be....less than optimal. This was meant to code within the context of a programming language, not HTML markup. It has some neat things going on out of the box but you will need to install some plugins to really make this work well. Then again, this is a code editor, a spruced up notepad/kate/gedit/, this for me as acceptable. As long as you know what you are doing it is fine.

Did I choose it? Well, almost. There are some things that made me look elsewhere. Why? Well here is why.

  1. Refactoring. Well I grant you that you can do that on a single file quite well with Sublime Text 3 but across files? At least to the best of my knowledge, it can only be done with string replace. Less than safe.
  2. I am a little annoyed that I need to do my build configurations aand other automations via a JSON file. It has an appeal with its simplicity but I just want something a little less....manual. I want to code applications, not code configurations.

Don't get me wrong is a good tool and lost by a hair due to my OCD nature when it comes to code. Stay tuned for more of my exploration into the best tool for code editing for Apache Corvdova/Ionic Framework.

Related Items: