Rikki has been chipping away at me for months now about a relatively new OS X text editor called “TextMate“.
I’m a long time BBEdit user. I’ve used it ever since version 5 and I’ve never coded anything in any other text editor - so it was always going to be an uphill struggle to get me to switch. BBEdit is comfortable and feels totally natural. I don’t have to think about the interface, my mouse finds its own way around.
Rikki was selling me on many of TextMate’s features, including the “snippets” editor. This allows you to define “snippets” of text that are activated either via a hot key or via a keyword followed by a tab. TextMate comes with hundreds of pre-defined snippets, many for PHP. Not only can you define snippets of text, you can also use TextMate’s tagging system to allow you to tab through the result to change data.
For example:
You type: “array” then hit tab. It adds “$arrayName = array( ‘var’, );” to the document with ‘arrayName’ highlighted. You type in your desired variable name, hit tab and it moves to “var”, change that and hit tab and it moves to the comma, allowing you to delete it or to add more elements to the array.
I finally got around to trying out TextMate today and I’m sold. I’ve purchased a license and retired BBEdit. There are so many time-saving features: from the project display which allows you to list all your project files as a drawer (a common feature to IDEs but lacking in BBEdit) to being able to create your own snippets (I have created one where you type “ips” and hit tab and it adds “$this->ipsclass->” into the document and a few for comments, functions, etc). You can also create commands which can run bash / perl scripts. I have one that takes the highlighted text and runs it as a query on my test IP.D database.
It’s also very, very quick unlike most IDEs I’ve tried. There is no lag when typing and apart from a few seconds for the syntax colouring to kick in when loading a new document (you are free to edit and move around the document while it thinks about the colours, it doesn’t lock up the computer) everthing is instant.
I took a quick movie capture of it in use. Notice how the mouse doesn’t move until I double click on ‘require’ to show off the “Get Document for Word” feature (I set that to F3). The function block illustrates the ability to tab through the snippet elements. Sorry about the dodgy quality and the dark gray banding across the first fifth of the window.
If you’ve got OS X, go buy it now. If you’ve not got OS X, buy a Mac first. It’s almost a killer app.
TextMate.mov ( 2.5mb Quicktime .mov(ie) )
Recent Comments