Sublime Text

Sublime Text is a proprietary cross-platform source code editor. This app development tool natively supports many programming languages and markup languages.

Features:

  • Command palette feature allows matching keyboard invocation of arbitrary commands
  • Simultaneous editing allows making the same interactive changes to multiple areas
  • Offers Python-based plugin API
  • Allows developers to give project specific preferences
  • Compatible with many language grammars from TextMate

Sublime Text advantages

If you use it, you will realize how fast it is. Sublime Text 2 has some neat features like multi cursor input, multiple selections etc that will make you immensely productive. Good number of plugins and themes, and also support for those of Textmate means you can do anything with Sublime Text 2.

Key Strokes

One of the things I used to love about Dreamweaver was the way I could just drag and drop assets, an image for example, direct into code view and voilà! I have a fully formed IMG tag complete with dimensions and URL.

I had this notion that code editors meant you had to type most of this stuff out longhand but I was wrong. Things like fuzzy search, tag completion and plugins (more on all this later) are optimised to reduce key strokes and our reliance on the mouse.

Take a basic ‘copy’ command for example. We all know (I hope!) the shortcut keys to copy something in any program. It’s two keystrokes and done in a single movement. The mouse equivalent has four separate movements: 1) Move the mouse to ‘Edit’, 2) Click ‘Edit’ 3) Move the mouse to ‘Copy’ and finally (after all that work!) click ‘Copy’.

It sounds pendantic I know, but any repetition of tasks that can be easily done through keystrokes is going to save us a lot of time vs using the mouse, especially when we consider how often we may use these commands throughout the day. This is one of the biggest advantages of Sublime Text over Dreamweaver… the program feels like it has been built around the developer and engineered to reduce keystrokes and mouse reliance.

Multiple cursors

One of Sublimes great features that Dreamweaver doesn’t have is multiple cursors. This is great for making multiple edits or inserts in your code at the same time. For example:

Highlighting text and using Cntrl+D will let you select and change other matching occurrences of that text.

Cntrl + click will place multiple cursors at specific spots

Holding down the scroll wheel will let you highlight a block of code, or insert a column of cursors at the same indent position (shown in the image below).

Cntrl + Alt + W will insert an opening and closing tag, allowing you to edit both the opening and closing tag values at once.

Shortcuts

There are hundreds of useful shortcuts in Sublime Text for commands that don’t exist in Dreamweaver. Shortcuts for things like tag wrapping, line duplication and bracket selection to name just a few.

Even after a year, I’m still discovering new shortcuts that help make me a more efficient coder and if a command doesn’t have a key binding, it’s easy to assign one.

Fuzzy search

This is another great advantage Sublime Text has over Dreamweaver. Pretty much everything is based around ‘fuzzy’ searching. A fuzzy search means you only need to enter a few key characters and Sublime Text will try and match these with a list of what it thinks are the most relevant commands.

For example, in the command palette, typing ‘IP’ will bring up the ‘Install Package’ command. In CSS, typing ‘bco’ will bring up the ‘background-color’ declaration.

Code preview

One Sublime feature that can be pretty useful is the condensed preview of your code layout, especially for large pages. This allows you to quickly view and select areas of your code based on its overall shape and structure.

Bracket and div highlighting

Ever find yourself wading through big chunks of code in Dreamweaver trying to locate that closing div or bracket? This is a problem easily avoided in Sublime because of the way it highlights opening and closing brackets, divs and other tags.

Even if you can’t see the closing tag, Cntrl + M will let you skip to it.

Bookmarking

Bookmarking is another one of those great features that you don’t know you’re missing out on until you start using it. While there are plenty of good ways in Sublime to skip to specific areas of code (such as got to line number Cntrl + G or go to next bracket Cntrl + M), bookmarking allows you to set specific way points for even faster access.

Using the command Cntrl + F2 sets a bookmark and F2 will skip through each bookmark specified.