Ruby, JavaScript, Sass, iOS. Stinky Cheese & Beer Advocate. Working at CustomInk and loving it!

TextMate, by Programmers, for Efficiency Experts

About a year ago a fellow co-worker of mine was raving that I should learn VIM from the command line interface (CLI) so that I could use it for all my text editing needs. My co-worker at the time was (and probably still is) the Systems Administrator and Lead Application Developer for a company that sold cheap discount software. During my tenure there I served as the Marketing Manager and as such, many of my projects to completely overhaul their search engine and online marketing strategies called for aligning their internal tools and processes. While doing said technical revamps and specification writing, I guess I was exposed as more of a geek than your typical marketer. Hence the recommendation to go further down the rabbit hole. DISCLAIMER: before I go any further -- I would like to say, yes, that link up there is a shameless plug and is meant only to help in the organic search strategies for OK, I feel better.

Down the Rabbit Hole?

So did I do it? Am I using VIM and did I even code this XHTML in such an arcane system? The answer is no, but I will admit that I love the CLI from a UNIX operating system. In fact, I will be writing another installment on how to tweak and customize your shell environment.

The main reason I did not learn VIM is because it goes against my technical MO which is also the main theme of this website -- that working at a higher level is better than keeping your head in the trenches. Sure tried and true pays off sometimes, but technology moves fast and there evolves better ways. VIM stays to far down the path of the harder, at least for me anyway. I typically like to get into the details only enough, so that I can figure out a better way of doing things. VIM would have made a good choice to learn if I was forced to work in a Windows environment where my only escape to the UNIX-style world was shell access to a Fedora Core operating system, but hey, that's not the case. I like to advocate working and hosting on Macs and that's a convention all to itself.

Die VIM, Die! Enter TextMate.

OK, now I'm going to say it and say it only once. Using TextMate from the Mac OS X is pure "Convention over Configuration" one of the founding principles of agile software development. I know many don't like the hype of this methodology, especially when used to discuss Ruby on Rails application development but I think these are the same people that like working harder, not smarter and I'm sure they said the same thing about PHP six years ago and also think JAVA is the only way of programming. So we can ignore them, I choose to. So here are a few of the marketing reasons about why I choose TextMate as my editor over BBEdit on the Mac OS.

Column Typing in TextMateColumn Typing - I love clean organized code and this image snippet shows that editing clean organized code is really easy in TextMate which keeps you from performing the same change across multiple lines.

Collapse Content in TextMateCollapsible Foldings - Use these to hide method definitions, class files, tables, DIVs, or any of your markup that you want out of view. I have also found this especially helpful when editing or viewing very large XML files. HINT: You can old down the option button to fully collapse and expand the foldings. Option-collapse to hide everything and then open up the folding like normal and it will easy you in tag by tag.

Syntax Highlighting in TextMateSyntax Highlighting - Not just for the whole document, but nested markup too. TextMate does this better than any program I've seen and it does it really well for a huge amount of different file types, even shell scripts. This task was a huge chore in BBEdit. HINT: When you download TextMate, don't stop there. Install Subversion on your system and download the trunk files to get all the bundles. This not only gives you more syntax highlighting, but more actions too.

Tabbed Files in TextMateTabbed Navigation & Project Drawers - This was another chore in BBEdit and by now most applications are figuring out that tabbed navigation is a must for every program. HINT: One of the things I really like about using the project drawer, which comes up automatically if you drag a folder onto TextMate, is that you can create custom environment variables for the project that talk directly to your shell environment. These could be custom paths, etc.

That's just a small excerpt from their their website on why TextMate is so great. There are many more and I have only really started to scratch the surface on using it. Here are a few more that directly relate to how I use it.

Man oh Man.

TextMate links directly with your shell environment. That means you can run scripts and code directly from the editor. It even has an HTML output window. I am constantly reading the man pages for all the UNIX software that comes on OS X. Rather than doing this in the shell, I select the command or application name from within TextMate and it pops up the manual page in a nice searchable HTML window. For instance, rather than using man dig or man rsync from the terminal, just select it in TextMate and hit Control-H.

It's all Hallow's Eve

What can be cooler than a built in theme called "All Hallow's Eve". This theme is the typical black background with high contrast code and markup that you see in many of the screenshots for TextMate. Many VIM'ers loved this setting for legibility and its built right into Textmate.

What's the Difference?

Diffs are great and tell you a lot. I really only discovered them because TextMate offers such a simple way of using them. In this example I can show the differences in the configuration of a 2621 Cisco router. This really helps sort things out.

TextMate DIFF Example

Lastly, I would love to hear why some other people have moved to using TextMate or perhaps you may have an example of another editor that is the end all for geeks like us?