What is Toluu?
Toluu is a free service for sharing the feeds you read and discovering new ones.
Get Invite

TextMate Blog

TextMate and OS X


ProjectPlusAugust 13

There is a plug-in from Ciarán Walsh called ProjectPlus. It does SCM badgets (Git and SVN), Finder (color) labels, preserves project state between sessions, and lots more.

Bundles and GitHubAugust 12

To make it possible to find TextMate bundles by automatic tools such as TextMate Gem and the new GetBundles bundle (currently in review) the naming convention proposed is to include .tmbundle in the name of your bundle project.

Presently most bundles at GitHub use -tmbundle but likely because a dot was previously not allowed in a project name.

Japanese ManualAugust 11

Thanks to the work of Takaaki Kato there now is a Japanese TextMate manual.

A few things still need to be translated (there is an issue tracker) but it should already be very useful for people who prefer reading Japanese over English.

And no, this does not mean that a new CJK-compliant TextMate has been released. The best approach for using CJK with TextMate is still via the plug-in.

Working With History in BashJune 28

Yesterday we talked about favorite bash features (on the ##textmate IRC channel). I figured it was worth posting mine to this blog, they mostly revolve around history, hence the title.

Setup

My shell history collects a lot of complex command invocations which take time to figure out. To ensure that I have access to them at a later time, I have the following 3 lines in my bash init:

export HISTCONTROL=erasedups export HISTSIZE=10000 shopt -s histappend

The first one will remove duplicates from the history (when a new item is added). For example if you switch between running make and ./a.out in a shell, you may later find that the last 100 or so history items is a mix of these two commands. Not very useful.

The second one increase the history size. With duplicates erased, the history already holds a lot more actual information, but I still like to increase the default size of only 1,000 items.

The third line ensures that when you exit a shell, the history from that session is appended to ~/.bash_history. Without this, you might very well lose the history of entire sessions (rather weird that this is not enabled by default).

History Searching

Now that I have my history preserved nicely in ~/.bash_history there are a few ways to search it.

Using Grep

The most crude is grep. You can do:

history|grep iptables

For me (on this particular Linux server) I get:

4599 i
TextMate (Ruby) TricksApril 28

John Muchow of Mac Developer Tips recently posted a screencast showing a neat way to debug your Ruby code.

Speaking of the Ruby bundle, Ciarán Walsh has a post about the design philosophy behind the mnemonics of the Ruby bundle and a few highlights.

And while there seems to be a preference for writing TextMate commands in Ruby, anything that you can run from a terminal (shell) can be used. A step-by-step tutorial about how to write TextMate commands in PHP is available at Ciarán’s blog. I pushed him to write this one, as I believe there are a lot of people who work with PHP in TextMate that never got around to writing custom commands in the false belief that they would have to learn elisp or some similarly obscure language :)