It’s finally here! MacroMates has released their new text editor, TextMate. It’s billed as bringing “code and markup into the 21st century”. You can tell which Mac editor they’re competing against with their first paragraph:
It’s time to turn envy into pride and end your desire for Windows- and UNIX-based editors once and for all. TextMate is The Missing Editor that has puzzled switchers by its absence and kept veterans longing. With a wealth of exclusive features like tabs, foldings, and macros, TextMate is well ahead of other native, graphical editor on OS X — and you don’t have to sell your bones to afford it.
They’re obviously referring to BareBones’ BBEdit, which has been the flagship text editor for the Mac.
So how does TextMate stack up to BBEdit? My initial impressions are very good. The editor at first seems underpowered or too plain, but that’s the beauty of it. There are no crammed palettes which I rarely use, and when I do it’s usually the same items. With TextMate, there’s just a simple window. But don’t let it’s simple interface fool you. There’s a lot of power under the hood. Think of it as a Mini Cooper with a 427 in it.
I won’t go into all the features available, you can go to the Web site to read those for yourself. Some features I will mention are code folding, column typing and triggers/snippets. These are features I will be using all the time.
Code folding is where you can expand/collapse chunks of code like functions, if and when statements, html blocks, etc. It’s a nice way to find your way around in a large script and makes the code easier to read.
Column typing allows you to type the same thing across multiple lines without repeating it several times or copying and pasting. This comes in handy with lists or table cells where you want to edit their attributes all at once.
Triggers and snippets are where TextMate really shines, in my opinion. Want to add a table? Just type ‘table’ and hit tab and up pops all the code you’ll need for a basic table. Want to add an anchor? Type ‘ahref’ and hit tab. An image? ‘img’ for a simple image or ‘image’ for an image with more attributes. And it’s not just limited to HTML. It can be JavaScript, PHP, C++, etc. Whatever you want since the snippets list can be edited to suit your specific needs. This will easily replace the few buttons in the BBEdit palettes I use.
There are a lot of other features, so go to their site and check it out. Oh, and did I mention that TextMate is only $39 until November 1? And after that it’s only $49!
I found a problem with it that is keeping me from using it as my default editor right now. It doesn’t paste formatted text from a browser correctly. When I work on EE templates, I usually copy the code from the EE control panel and paste it into BBEdit. BBEdit maintains the code formatting. TextMate just pastes it in as one long string. That’s horrible. Even SubEthaEdit and skEdit paste formatted code.
I’ve already sent an email to the developer about this. Hopefully this and other nifty features will be added and bugs squashed quickly.
The search needs to be able to search directories without them being part of a project. The Undo is terrible, it does every single little step. BBEdit’s is not perfect, since it every so often undos more than I would wish, but I prefer that over an extremely slow and tedious undo. Find Differences is invaluable to me as well. CVS/Subversion support is forthcoming I see in version 1.2, which would solve the lack of that. The ability to open/close the underlying ‘project sheet’ for the current project. AppleScript support would be ideal, since I have a few once that I use to automate tasks (I mean you can automate PHP scripts with Terminal actions, you cannot beat that). There are a few cosmetic/UI problems as well dealing with an edge between the content and the sides (a bit of padding a darker colored line).
Et cetera, et cetera…I am really picky…
Well when you’re dealing with PHP code as much as you are, I can see how one could become very picky, especially if your work flow becomes dependent on certain features.
Find differences is pretty nice. I used it earlier today to combine two CSS files.
TextMate did work out really well tonight though for me. I had about 15 files with PHP includes that pulled in several different files that needed to be made static. Some of those includes were the same in each file, so I made some snippets out of them and only had to type in a few letters here and there to put things where I wanted.
What would’ve really been nice is if I could’ve run some kind of script that would literally put the code in from the includes.
Regarding the features you would like to see, have you written the developer about them? I’ve already got a response from him about my problem.
Good luck with that. You would think BBEdit would have added some of the more obvious features used in other popular editors like code folding, clipboard history and snippets. BBEdit’s glossary is sort of like snippets, but I like the way TextMate handles it better.
Overall I agree, if the best features of BBEdit and TextMate were put into a single editor, it would rock my world.
John Hicks has a good post up about his first impressions of TextMate. He points out what he likes and what he doesn’t. I agree with him on most of his dislikes except for the snippets.
I also very much agree with him missing some kind of code navigation, like BBEdit’s function list button.
The only reason I would find code folding helpful is if there was a way to auto-fold and auto-unfold all functions, thus allowing me to simply have the functions I want to modify open. A clipboard history would be nice, but I think that is a feature I want for the whole darn OS. Unless I am doing a lot of HTML work, I am not sure snippets would be worth the trouble for me to set up. So much of my work is modifying existing code or simply writing completely new stuff.
The BBEdit guys seem to spend a lot of time recently on the stuff under the hood, which from a developers point of view makes a good amount of sense. Still, some fresh, seemingly obvious, new features would be nice too.
You can have TextMate open files auto-folded and then there are several levels of folding/unfolding through the keyboard available as well. Hit F1 to toggle folding on the currently viewed block.
I thought snippets would be a feature you would like. Did you notice that you can set up snippets that have placeholders for quick assignment of values to attributes? So if you use a lot of switch or if/else statements or loops then this could come in handy.
After reading all these comments I feel like my text-editor should be a yogi master or something.
I’ll have to give text-mate a try. I don’t do much straight php stuff, but I do a lot of html, find/replace, and automate a lot of my work.
DreamWeaver MX does most of what I need quite well. But lately DW has been crashing on a semi-consistent basis and its really annoying.
I’ve been doing my personal site with BBEdit, just trying it out. I’ll do the same with text-mate.
Oh, and Chris, why are you copy/pasting from EE templates? Setup the ftp and go to town! So much faster!
I never liked Dreamweaver. Everyone was gushing about it ever since it came out, but every time I tried it, I hated it. WAY too bloated and slow. And it crashed a lot on me.
Les, I have no idea why I never used the new FTP feature in EE. I remember reading about it, but it must not have registered how much easier that would be. Thanks for pointing it out for me!
After playing with it for about an hour, there are some killer features that I would really like to see in BBEdit, such as smart typing and tabs. However, there are definitely more than a few things I feel are missing or underdeveloped too. Man, what I would not give to get BBEdit and Textmate in bed together so I could have the perfect code editor.