On 21/4/2006, at 17:26, José Manuel wrote:
[...] I have tried with this line at the end of the command (which is in Ruby):
`/usr/local/bin/mate "$TM_FILEPATH" -l $CARET'`
but it makes TextMate freeze.
I assume $CARET is the new line number? Try instead this (I wrapped $CARET as I think you meant it to be):
`/usr/local/bin/mate "$TM_FILEPATH" -l #{$CARET} 2>/dev/null &`
An alternative approach is the “replace document with snippet” as recently discussed [1].
Inspired by this letter, I put a macro in the C bundle which inserts missing includes in the top of the document. The key equivalent is ctrl-# -- it’s not perfect, but it’s a good start :)
[1] http://lists.macromates.com/pipermail/textmate/2006-April/ 009742.html