Slashdot Log In
TextMate
Posted by
samzenpus
on Mon Mar 26, 2007 02:03 PM
from the read-all-about-it dept.
from the read-all-about-it dept.
OSXCPA writes "TextMate is a closed-source, GUI-based, extensible text editor that looks and behaves like a mashup of GNU Emacs ("Emacs") and NetBeans. This book is a primer and reference for TextMate. The blurb on the back of the book identifies the target audience as 'Programmers, web designers and anyone else who regularly needs to work with text files on Mac OSX.' After working with TextMate and reading through the book, the target audience is spot on. For example, the book briefly covers basic text editing, but provides in-depth information about basic operations (keyboard shortcuts, customizations, etc.) more advanced users will want to know and beginning users should know." Read below for the rest of OSXCPA's review.
| TextMate: Power Editing for the Mac | |
| author | James Edward Gray II |
| pages | 193 |
| publisher | Pragmatic Programmers |
| rating | 8 |
| reviewer | OSXCPA |
| ISBN | 097873923X |
| summary | Excellent for the more complex scripting features of TextMate |
I am reviewing TextMate: Power Editing for the Mac ("TPEFTM") by James Edward Gray II, published by The Pragmatic Programmers LLC, which I received from O'Reilly Media because I am the organizer of the Forest Park Ruby Meetup group. I received no compensation other than a copy of the book. I am relatively new to Ruby and Rails, but studied C and Java at University using Emacs and NetBeans. I am not a professional developer by any means, so if I can make sense of a tool and follow a book or manual, newbies should have no trouble.
The book and online manual are targeted at completely different audiences. The online manual clocks in at 97 very terse pages (print-previewed as-is in Internet Explorer) while the book is 193 pages. Despite the 100+ page difference, the online manual is intended for the hardcore geek and covers much more detail with less hand-holding. The book is written in a conversational tone that occasionally borders on distracting (e.g., "The Ruby executor is quite clever...") but no more so than other Pragmatic Programmer books.
Beginners and road warriors will find the book very handy, literally. I am a 'dead tree' book fan, especially regarding 'how-to' style documents. I like my books splayed open on my desktop so I can go from book to book as I work. At 193 pages, 'TPEFTM' does not like to sit open and flat, but it does fit easily into a laptop bag. The book does not come with a CD, but all the code is available on-line. I prefer this delivery system since besides the fact that I hate ripping CD envelopes out of books, TextMate is only available as a download anyway. Links to various third-party automations, commands and code are included throughout the book, and most of these 'ad-ons' are some flavor of open-source.
The book is organized in order of increasing complexity, so it is a good introduction for someone new to IDE-based development in the 'big tool that does many things' school. TextMate consciously mirrors some of the complex functionality of Emacs, albeit in a more accessible form, and the book eases the reader into this world in small, logical steps.
This is not to say the hardcore geeks won't find the book useful. There are many tips and tricks throughout the book that help a reader work faster and more efficiently (lots of keyboard shortcuts and scripting).
I tend to put sticky notes in my books, especially manuals. Find a code recipe you like? Sticky-note the page. The book contains many shortcuts ("Command Line TextMate", "filename matching") that inspired sticky-notes for later tinkering. The ordering of the tools is such that the reader can sit at the keyboard and work the examples straight through, read it start to finish 'offline', or use it as a reference book. I would encourage at least one straight-through read to ensure seeing every passage once. Browsing the index, chapter or page headings will not yield everything on offer.
TextMate is primarily viewed as a Ruby on Rails development tool. The book expressly acknowledges this (the code examples are mostly written in Ruby), but provides detailed instructions for handling syntax highlighting in Java, C and other languages via Automations. I did not try this out, but the instructions seemed fairly straightforward — someone with the passion to write Haskell in TextMate could probably set it up.
When deciding whether to buy this book or not, the key consideration is 'what does the book give me that the online documentation does not?' Textmate has several features that require elaboration, especially for newer users. TextMate supports various 'shortcut' and 'script-like' technologies — code snippets, macros, automations and two different types of commands — plain *NIX shell commands and TextMate 'automation commands'. Chapters five through 12 cover these tools individually and when combined. Purists may say 'well just use Emacs and write LISP' but the TextMate framework is more accessible to someone with less developed skills (and with less time to develop LISP-Fu). It provides a stepping stone for ambitious users, but allows for 'just getting it done'. I found these chapters to be the most compelling in the book both because they cover the most valuable features of the TextMate environment and they introduce skills a newer user should have (*NIX scripting, pipes, etc.) and more experienced users already have, but will want to implement in the TextMate context. While the online manual covers the technologies in detail, the book provides a more structured, user friendly introduction with enough detail to get work done and lay the groundwork for future development.
For $29.95, I do not expect exhaustive coverage of every feature. While 800+ page tomes have a place, it is nice to have a manual that fits in my bag. The coverage is very good for the basics and excellent for the more complex scripting features. I would definitely recommend this book for newer users, anyone who wants a readable, portable guide and those who plan on using the advanced scripting features, especially in conjunction with preexisting NIX system skills.
You can purchase TextMate: Power Editing for the Mac from amazon.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
What is ir again? (Score:1)
(http://www.networkmirror.com/ | Last Journal: Thursday July 05, @04:34PM)
Re:What is ir again? (Score:5, Informative)
It is a text editor with some ability to integrate with a development environment (but not quite an IDE) that is most commonly associated with Ruby on Rails development, but can be used to work in other environments. Which part of that isn't clear?
-matthew
Been demoing it myself. compare to BBEDIT (Score:5, Informative)
If I did not already have BBEDIT i'd have been very impressed. It also spurred me to look for features I liked to see if they were actually in BBEDIT and surprise they were there all along, I just had not noticed them. On the whole BBEDIT is more powerful and with more thoughtful distribution of things across the menus for easy access. But each has some specific features that might make or break the difference to specific users.
The big selling point of TextMate, is it's powerful active templating and macros. BBEDIT has text factories and lets you write filters so in principle simmilar behaviour might be possible. But TextMate has huge libraries of these already.
For example, when writing python, pull down the python template for a class and it gives you boilerplate class text, but then as you fill in the dummy fields it, for example, the args, it also automatically typing self.arg = arg in the function. Is that helpful? well probably yes in most cases.
likewise tabbing, will move between he dummy fields. And you can ask it to autocomplete a variable name for you and it will do the autocompletion from a dictionary it builds from scanning the document itself and finding variable names. In python which allows silent typos, that could be helpful.
Both BBEdit and Textmate have roll-up functions and oddly enough both implementations are buggy and don't properly recognize the ends of functions.
Both have emacs key bindings avaialble.
as textmate grows and add more and more language templates, it's ironically making those hard to access since the menus are getting too long.
both have grep search. Beedit has multi-file search too.
BBEDIT does a better job of exposing some basic text ops like, zapping invisible chars or converting line endings. It also shows tabs stops better.
A couple of things I have not yet figured out how to do in Textmate yet that I really am jonesing for are
Line numbering, and the ability to mark a set of lines and change them to comment lines in a language aware fashion.
A big marketing advantage for BBEDIT is that there's a free version. This way I can use the full price bbedit on my main computer but still have a nearly idendtical envirnoment on all the computers I use less often without paying for it. (for example, I can't legally use my work lic on my home computer, but I can use the free one).
So far I'm much preferring BBEDIT, though I wish it had the autocompletion and the active templating. My productivity is still higher in BBEDIT. But part of that is familiarity.
Both have command line invocation.
both are very good text editors and I could live with either. I suspect BBEDIT will be the winner of my test. THe free lite-version I use at at home forces me to continue using it even if I select TextMate for work.
For those of you in the Linux and Windows World who never had BBEDIT. I pity you.
Re:Been demoing it myself. compare to BBEDIT (Score:5, Informative)
Line numbering,"
View -> Gutter -> Line Numbers
" and the ability to mark a set of lines and change them to comment lines in a language aware fashion."
Command-/ (apple key + slash) will do just that.
almost (Score:3, Funny)
(http://www.atomjax.com/)
What I want to see is a mashup between vi and emacs, so we can put the eternal battle behind us once and for all.
Re:almost (Score:4, Insightful)
It really depends what an improved UI is. For intuitiveness, nothing beats Notepad - so it must be the best editor because it's HCI interface is incredibly intuitive and works, right? I open the file, I see it, I click and I edit where I clicked. Nothing simpler.
Of course, if you want something more powerful, then things get interesting. Some editors tack on stuff to their Notepad-derivatives, which end up being wildly confusing mess of functionality (e.g., Microsoft Word - is there any other way (than clicking the toolbar button or key accellerator) to do stuff like bold/italics? Other than going to Format..Paragraph, choosing Bold, then clicking OK?
You can say similar things like vi/vim and emacs - they're incredibly powerful, and while the HCI doesn't really appeal, it is learnable. (To fan the flames of vi vs emacs, I find the vi commands intuitive).
I learned vim on Windows. I had to use vi on an embedded Linux device using a serial port, and managed to do the basics after pestering some coworkers. So one weekend, I sat down, ran vimtutor, and learned it. I was impressed how nice it was editing around without scrambling for the mouse (switching between mouse/keyboard is quite a context switch at times). So the HCI of vim isn't that great since you've really got to learn the UI, but once you do, you can be productive...
Re:almost (Score:4, Insightful)
(http://slashdot.org/)
HCI experts might know lots of stuff, but they don't know everything, and they've certainly come up with some pretty shitty ideas in the past. Also, they tend to focus on new users, not those who use editors all day long. There are a million editors out there that follow you and your HCI philosophy, but over and over again, EMACS, vi/vim, and other powerful non-HCI editors are chosen by programmers and people that work with text files all day long. Wonder why? I guess we're all stupid and we should get with you and your program?
Advertising (Score:2, Flamebait)
I use it, but i've always wondered where (Score:1)
Since i wrote a lanaguge using textmate syntax highlighting, i've always wished for someone to make syntax highlighting built into the Cocoa Text View. But, maybe that's a tall order.
Great editor but the C parser sucks (Score:2)
(http://www.csc.kth.se/~erjohan)
int main(int argc,
char *argv[])
{}
the main function will not be found.
It is a good book (Score:3, Interesting)
TextMate is a very impressive editor. I use it for almost everything now - PHP work during the day and other languages by night - because it combines Mac OS X accessibility to Emacsesque power. Already I have a little personal library of clippings, scripts, doohickeys and thingamajigs I've whipped up based on the guidance in the book reviewed above.
I'd recommend the editor and this book as a good introduction to it.
versus Visual Studio? (Score:2, Insightful)
KDevelop (Score:4, Informative)
(http://timburrell.net/)
If you haven't tried it in a year or so, give it another go. In my opinion it's superior to the VS IDE, in many ways. The editor is fantastic, much better than the VS IDE editor which isn't as configurable, and doesn't provide as rich of an environment. Code folding, and indenting is much nicer in kdevelop.
Also, kdevelop's autocomplete is a significant step up over IntelliSense. It works in all cases, even for add on libraries (it's very easy to build additional autocomplete databases), and parses super fast (near instantaneous) -- and actually does the right thing in all cases. I was frequently annoyed by IntelliSense when I was doing win32 programming. Not to mention that kdevelop actually autocompletes variable names as well (as you type) not just functions and their parameters.
I would say that the integrated VS debugging facility is nicer than kdevelop's, however kdevelop's debugging still works VERY well -- I think that this is just one of visual studio's strong points, and an area where the open source alternatives are still playing catch up. But seriously, a lot has happened in the past year (or so), and it's become a tool I can't live without.
I've also heard people praise Apple's Xcode in significant ways (even windows people). Not having used it though I can't comment, but it sounds to me like visual studio isn't the be all and end all of IDEs that it used to be.
The golden age (Score:5, Interesting)
I.e., there will probably always be the exception where a closed-source product is so good that it's worthwhile accepting its closed-ness. But for things like text editors, etc., those exceptions are rare enough that I can defer looking at the product until I hear every tech news site praising the product from the rooftops.
It's a happy state of affairs for a software consumer.
Re:The golden age (Score:4, Interesting)
(http://seenonslash.com/ | Last Journal: Friday May 11 2007, @04:02PM)
Re:The golden age (Score:4, Interesting)
(Last Journal: Thursday March 29 2007, @11:32AM)
http://lists.macromates.com/pipermail/textmate/20
Re:The golden age (Score:4, Insightful)
(http://www.nine-times.org/)
Yes, honestly, I'm not sure everything always has to be open source. I am a bit of an open source advocate at times (though I'm not a developer). I believe everything needs to use open standards to that different programs can interoperate, and I believe that many things benefit greatly from being open source. However, I don't see why people want to refuse all other models.
Let me put it this way: the developer of TextMate is not abusing any market. He's not trying to force people into proprietary formats or protocols. Textmate is a very good piece of software at a reasonable price. It's relatively simple, and it does what it does well without a whole lot of bloat.
And what's wrong with that? Especially for those of us who aren't going to want to rewrite our text editor, and who are willing to reward developers for good work, what is wrong with that?
In this case, are we running a risk of our text files being rendered unreadable if TextMate development stops? Are we possibly not going to be able to edit those text files anymore?
And really, honestly, I'm sorry, but if you're an open source developer who believes everyone must use open source software at all time, then by all means, develop a replacement to TextMate. A native Aqua GUI text editors for OSX with all the features of TextMate released with a GPL license-- I'd love to see it. But lets not begrudge a developer who's doing a good job just because he's trying to see a reasonable return for his work.
This is a problem: (Score:2)
(http://www.hyperlogos.org/ | Last Journal: Wednesday July 18, @08:19PM)
So in other words, if I want to go back and find something later, I may or may not be able to find it in the materials intended to help me find things in the book, and since (as above) there is no included CD, I don't have the text of the book, and therefore I cannot search its contents to find what I'm looking for.
Reference books in which you cannot find things are useless.
Textmate had me at customizable snippets... (Score:4, Informative)
The snippets, IMHO, are the best thing ever. Honestly, my productivity has shot through the roof because creating simple things like for loops takes about 8-12 key hits to get all the infrastructure done, and with all the proper brackets and semicolons all perfectly placed and formatted. I shit you not when I say that this has eliminated 90% of my debug problems.
plus you can essentially make anything a snippet, from simply putting out your details (say an entire address formatted) and the like. Totally understands and formats as per a given document type.
The book reviewed here is pretty sweet too, and I learned a few things that I wasn't aware existed. Its worth buying as well simply to use as a good reference material.
I defnitely recommend trying this as shareware for at least a few weeks.
Niiiceeeeee (Score:1)
Must have for any user, Mac or PC.
D: (Score:1)
(http://zeromusmog.com/)
This...Textmate, you say? (Score:2)
I'm sorry, this is Slashdot. Your choices are limited to vi or emacs. There are no other editors.
I bought the PDF version yesterday (Score:2)
(http://www.markwatson.com/)
So far, I find the book to be very worthwhile.
BTW, I also bought the "beta book" PDF for Pragmatic's new Erlang book - that also looks excellent.
Underwelmed by TextMate (Score:2, Interesting)
It's basically a sophisticated Cocoa Textwidget with an all-out scripting interface. It only costs 39$ and runs natively which makes it an OK deal, but the hype this editor gets just because it's the first of it's kind on OS X is baseless. If someone would come along and build an editor that has the same featureset as jEdit in a native, non-Java manner, then I'd be impressed and even pay money for it. But I've tested TextMate and have to say I'd rather learn one of the OS X Emacs ports which can be that much harder than putting up with yet another proprietary editor scripting language. That way I'll be able to use the old CLI variants aswell.
So be it that jEdit comparativly is a slowpoke and can't realistically open anything larger than 1,5 MB - it's the best editor out there and has been the feature-bar for the last few years for any other project or tool out there. No need to learn a new, proprietary tool that only runs on one OS and has less functionality.
My 2 cents.
Re:Underwelmed by TextMate (Score:5, Interesting)
TextMate gets a lot of its cleverness by working through the shell. Most TextMate hackers use Ruby for extension, but you can use shell scripts, Perl, Python, whatever you like that can be called from the shell.
You may be thinking of the language grammars, which are driven by Perl-like regular expressions. Is that right? I'm just struggling to see how you came to the conclusion that TextMate uses some new language.
Gvim (Score:2)
(http://www.perlpimp.com/)
I do use OS X though...
Yeah but.. (Score:2)
(Last Journal: Saturday October 20, @06:40PM)
Is it in some way similar to OpenOffice.org's ("OpenOffice.org")?
Try Smultron (Score:3, Informative)
(http://www.opendreams.net/jesse/)
http://smultron.sourceforge.net/ [sourceforge.net]
On Windows, I use PSPad (Free) or UltraEdit (Commercial). The only thing I know of on GNU/Linux is BlueFish and SciTe.
Re:Try Smultron (Score:4, Interesting)
(http://www.artboy.org/)
I use Smultron exclusively -- every few months I check out Textmate again since everyone loves it so much, but it seems like a perfect example of a program that is made by programmers for programmers. For someone just looking for a text editor to do standard HTML/PHP/JS coding with syntax coloring, templates/snippets and good hidden file support Smultron works wonderfully out of the box. It would be nice to have code folding, but not if it means having 30,000 features for C++ programmers getting in my way.
I preemptively surrender to all the Textmate fans who will respond -- I know there's something about it everyone else loves, it just seems as awkward and geeky as emacs (though better looking) to me!
sorry, TM is not viewed as primarily a Ruby tool (Score:1)
Anybody switching to Textmate from Vim? (Score:2)
(http://slashdot.org/)
... didn't think so.
And what's with the GNU Emacs ("Emacs") thing?
Oh, The Ignorance... (Score:3, Insightful)
1. TextMate is nothing like emacs. I actually dislike emacs. Nothing against emacs, it just doesn't fit me. (I used to use joe all the time, but recently decided I liked vim better).
2. TextMate is a text editor. It has three main features, two of which are pretty ordinary these days. The ordinary ones are tabs and a tree-file browser for managing a "project". The other one is its language definitions, which dictate the syntax hilighting, auto-completion, and commands that can be done on a file of that kind. The great thing is that the langauge definitions are fully editable down to the last detail, so you can manipulate them to be what you want them to be, all with a built-in editor, or even create your own!
3. I haven't heard this one here as much, but TextMate is MacOS X only not because they are elitist bastards, but because the Cocoa API is only supported in Mac OS X. Once you make your open source Cocoa API (GNUStep is a good place to start with that), then you can demand a port into Linux/Windows/etc.
4. Close-source != evil, despite what the OSS junkies say (or are they just freeloaders?!). I've done work on both open sourced and closed source projects. At the end of the day I have to eat. If no one pays me to code, then I don't have as much time to produce code. Most developers are in the same boat. Similarly, most companies don't want to pay developers for something that won't make them money. Otherwise they go out of business and noone can pay developers. In a utopian society that is all free and open source, who pays for software development? The point is thus two-fold:
a) It is difficult to have a world where everything is open source,
b) I don't mind paying for software if the company that makes it is actually devoted to making *good* software.
Not all close-source companies are out to steal all your money and screw you. Stop being so bitter.
I feel better. Carry on!
Not the first Mac extensible editor (Score:1)
Alpha was shareware, based on TCL and had different modes based on the language being edited. It could be extended using TCL scripts and was pretty advanced for its time. It won numerous awards from Mac magazines and was predicted to overtake BBEdit at any moment.
http://www.kelehers.org/alpha/ [kelehers.org]
Make Emacs taste like TextMate (Score:1)
(http://writerati.blogspot.com/)
However. It's not cheap, not cross-platform, and the "Emacs-like keybindings" are just bastardized enough to drive me up the wall. So I'm sticking with Emacs for now.
For anyone interested, here are some quick ways to modify the One True Editor to behave a bit more like TextMate:
Directory browsing of projects: Try Emacs Code Browser [sourceforge.net].
Snippets: Check out msf-abbrev [bloomington.in.us]. You'll be able to specify cursor location, fields, etc. similar to TextMate. I've also heard good things about Skeleton Mode). [emacswiki.org]
Macros: Try the Power Macros [linuxgazette.net] package.
Quick(er) buffer-switching: The ido.el [www.cua.dk] package works wonders for me. Note: If you're used to running dired from find-file, you'll want to set ido-show-dot-for-dired to t in your
ruby (Score:2)
I use it exclusively for C++ / Ruby development, its a small price for bang for buck.
I love the in-built ruby language that is available within the editor itself, creating custom scripts in native ruby is a huge advantage.
For Windows users, In-type is probably the closest, it uses "Bundles" and many other things. Check it out, nice screencasts are available: http://intype.info/home/index.php [intype.info]
A mashup of "GNU Emacs ('Emacs')" and Netbeans (Score:1)
(http://www.pentangle.net/)
Real programmers... (Score:2)
(http://www.khalidine.com/)
Gotta have source for small, important programs (Score:2)
I spend all day in my editor and dammit, it's going to look and feel exactly the way that I want it to. Namely, invisible, fast, and part of the rich command environment around it. And any editor that needs a 200-page manual is weighed down with crap I'll never use.
Re:GPL Issues (Score:2)
(http://www.danielthompson.net/)
Re:GPL Issues (Score:2)
-matthew
Re:GPL Issues (Score:2)
(Last Journal: Friday August 31, @07:08PM)
Copying the "look and feel" of something shouldn't be a crime, contrary to what companies like Apple think.
And I'll slip into my flameproof suit to say this: For all its power, anyone who thinks cloning the Emacs GUI (and that includes XEmacs) should be impaled slowly with a rusted farm implement. Surely we can do better than that bizantine, bloated, confusing, slow and labrynthic interface. Again, for all its power and all that.
Re:Vim verses Emacs verses TextMate (Score:2)
(http://www.livejournal.com/users/sinistertim101 | Last Journal: Saturday March 24 2007, @12:32PM)
And with Clippy on vim [sourceforge.net] who could ask for anything more? Can textMate do this [petebevin.com]?
Re:Surprise! (Score:2)
Re:Surprise! (Score:5, Insightful)
(http://aqpeag.blogspot.com/ | Last Journal: Saturday April 21 2007, @05:39AM)
I can't adequately describe how sick I am of seeing this particular whine constantly being made on Slashdot. Really a case of ESR's gift culture at work there, guys.
Re:Closed up Emacs (Score:2)
(Last Journal: Saturday August 18 2001, @10:14AM)
Re:Take it to a Mac site (Score:2)