TextMate usability flaws
I’ve posted previously about TextMate, a great text editor for Mac OSX. While it is one of the best text editors I’ve used due to its simplicity, elegance, and power, there are a few UI features that drive me up the wall, and make it fall short of being perfect.
Tab key behavior
Here I have a bunch of text selected. What will happen when I hit tab?
If you answered, delete your selection and insert a literal tab, you win the prize. What happens in Microsoft Word, NetBeans Platform, and any number of other IDEs and text editors? The text is indented. This is clearly the better alternative in my mind because it is non-destructive, and you can get the destructive tab with a simple addition of any delete/backspace key before hitting tab.
Furthermore, it’s inconsistent – if I had selected that text and hit quote, I’d have the text surrounded by quotes, not a single quote replacing all my test. I would argue that it does more harm than good to
To indent the region, you have to do ⌘-]; to unindent you do ⌘-[. I’m sure there’s a way to remap tab and shift tab to indent the region, but it’s not immediately clear to me how to do that. If you know how, please comment so people can see. Every time I switch between Netbeans and TextMate I invariably delete a whole region of text I meant to indent by forgetting to context switch and use ⌘-]. Fortunately TextMate has extremely good undo support, so it’s not the end of the world, but it’s that little bit of friction that slows down work and adds up to frustration over multiple instances.
EDIT: The following sneaks up on me all the time and also is very irksome. Here’s a rather typical situation:
Here I want to move the block of text backward; I resist the urge to hit shift tab, and instead press ⌘-[. What happens? Not what you’d think.
I really cannot think of a valid reason for this behavior; I have the first line selected, but it does not respond to the indentation command. Very frustrating.
Syntax highlighting with unsaved files
If you are working on an unsaved file, there is no way to tell TextMate to treat it as a file of a certain programming language, and thus which syntax highlighting rules apply.
Why is this irksome? When I’m writing a blog post, for instance, I have a lot of snippets I compose in TextMate. In order to get the syntax highlighting to work correctly, I need to save each individual file.
Now, I’m not suggesting TextMate is magical and can read my mind as to what ruleset to apply to an unsaved file. What I’m suggesting is the addition of a menu that allows you to apply the syntax rules of a given language to the current file, regardless of whether it’s saved or not. Notepad++, a Windows text editor, has precisely this feature.
EDIT: Thanks to the comment by Marshall, I realize that this complaint is way off base – I didn’t realize where the menu was but it’s there. Right where it says “Plain text” in the above screen shot, click that and you get a full list of languages to treat the file as.
Tab support is abysmal. There is no support for closing tabs with the middle mouse button, a convention followed by most major web browsers, as well as NetBeans and Eclipse. Instead, you are forced to click a small close icon on each tab. Fitts’s Law states that the smaller a button is, the longer it will take a user to navigate to; this is part of the reason that Apple has adopted menu bars at the top of the screen rather than floating with each window. Doing so gives the menu effectively infinite height, as the user can slam the mouse up and not go past it. Long story short, having the only means of closing tabs be a tiny button is bad UI design.
I could forgive the lack of middle button close IF the tabs supported sensible context menus to close other tabs. Compare for instance the options of some other products that support tabs:
Firefox’s popup menu on tab
When you right click a tab in TextMate, no context menu appears – there is absolutely no menu option I can find to close all tabs. Any system providing tabs should allow the user to make a blank slate for himself and focus on one (or zero) files at a time. As it stands, you must click each tiny x button individually on all the tabs.
Finally, you cannot undock tabs. Again, maybe I’ve just been spoiled by other products like Adium, Firefox, and NetBeans, but I consider it a very important feature to be able to undock tabs to show two windows side by side. While tabs are certainly more space efficient than tiling windows side by side, sometimes you really need to compare two files side by side. TextMate makes it very difficult to do that, especially when you have opened a project rather than individual files.
Here is the workflow in FireFox:
Before drag is initiated on the tab
While tab is being dragged; note that a translucent version of the page follows the cursor to indicate what is happening
After the drop is completed, the tab is split off from the original window and becomes a separate frame.
TextMate is an excellent text editor but not without some usability flaws. I’ve detailed some features that irritate me about TextMate, due to their violation of the principle of least astonishment; I’ve used enough other similar systems to expect certain functionality, and this expectation is violated in a few ways. These ways include the fact that hitting tab while text is selected replaces the contents with a literal tab rather than indenting the region, lack of a feature to syntax highlight unsaved files, an inability to close multiple tabs at once, and finally an inability to drag tabs out of the frame to become separate frames, so as to be able to compare documents side by side. Software designers take note – if you are going to have tabs, you must build in these features or your users will feel seriously limited.