This post originated from an RSS feed registered with Ruby Buzz
by Obie Fernandez.
Original Post: Little TextMate tricks
Feed Title: Obie On Rails (Has It Been 9 Years Already?)
Feed URL: http://jroller.com/obie/feed/entries/rss
Feed Description: Obie Fernandez talks about life as a technologist, mostly as ramblings about software development and consulting. Nowadays it's pretty much all about Ruby and Ruby on Rails.
I figure out new little tricks with TextMate almost everyday. In preparing the previous blog entry about upgrading to Ruby 1.8.5, I wanted to grab my command-line history in the shell where I had done the upgrade. Mostly to see if it would work, I piped the output of history to mate:
history | mate
Yep, it worked fine. (POLS?)
The history output had numbers along the left side, which I wanted to get rid of. It took me a minute to remember that holding the alt/option key triggers column-based selection. I then cut and paste the history commands over to a TextMate window were I was writing the blog post. To my dismay, a bunch of extra trailing whitespace came over also. I tend to get pretty anal about details like that, so I wanted to get rid of it. (I realize now that I could have used Bundles > Text > Converting / Stripping > Remove Trailing Spaces in Document.) However, I didn't think of that at the time. What I did think of was to use Text > Filter Through Command... with sed, and it worked fairly well (using sed 's/\w+$//' as the command).
I find myself using Text > Filter Through Command... more and more often. What do you use it for?