August 03, 2013
Now begins an ongoing comparison of the two as I switch between them during my quest.
Here are the links to both editors:
Sublime Text 3 - http://www.sublimetext.com/3
Brackets - http://brackets.io/
Brackets has some awesome shortcut-key combos. Here are my favorite:
ctrl/cmd + shift + o --- Quick jump to open file
ctrl/cmd + space --- Code completion! Just like in Aptana, but better because it supports custom methods and classes!
ctrl/cmd + shift + / --- Block comments the selected text
ctrl/cmd + e --- In the HTML editor, opens up the associated CSS markup for that class/id/element
I’m going to switch over to Sublime Text 3 now.
Brackets has a built in web server so that you can live preview all of your code changes… it’s awesome! I have WampServer installed so I get almost the same functionality with Sublime Text 3. But, Brackets will live update CSS changes in Chrome and auto-reload the pages when the HTML or JS changes.
I may have spoken a little to soon/enthusiastically about ST3’s and Brackets’ ability to offer code-completion for custom classes. It appears to work pretty-well for many custom classes, at least in comparison to Aptana, but it isn’t anything like Eclipse with Java. For example, typing ‘angular.’ doesn’t offer ‘angular.controller’ and such. This may be a naive expectation/remark on my part, but coming from Java development with Eclipse has made trained me to expect it.
As of now I prefer Brackets’ plugin setup compared to Sublime Text 3’s. In Brackets there is a Lego-brick style icon in the top-left corner. Clicking this opens a list of your installed extendsions in addition to a page for browsing the available extension repository. This is much easier then Sublime Text 3’s method which after a little Googling appears to require you to install a plugin to easily install plugins in a way that doesn’t require downloading each one and then installing them manually.
I’ll keep searching to see if Sublime Text 3 proves me wrong.
I’ve got ST3 Package Control up and running http://wbond.net/sublime_packages/pa…! I knew that ST3 was beta software going in but I didn’t know that it would have a vastly smaller selection of supported plugins (https://github.com/wbond/sublime_package_con…). I’ve also found a code formatter plugin, conveniently called CodeFormatter (https://github.com/akalongman/subl…).
I can’t seem to get CodeFormatter working. It’s installed according to Package Control but when I use open up the Command Palette and type in CodeFormat, which it says to do in their usage docs, nothing is listed. I also added it to my key bindings to see if ST3 simply had an issue with displaying Commands in the Command Palette, but it’s not working with the key binding either. How odd.
Well this is awesome! According to this StackOverflow—P.S. I love you StackOverflow—answer: Formatting HTML Code using Subli…, a simple form of code formatting is already built in! Just select all the lines you want formatted and then click Edit > Line > Reindent to make them all indent nicely. This isn’t full scale code formatting but it definitely helps! The answer goes on to explain how to easily set it as a keybinding which I quickly did to great enjoyment!