[TxMt] LaTeX bundle snippet tab triggers?

Allan Odgaard allan at macromates.com
Sat May 7 18:04:00 UTC 2005


On May 7, 2005, at 18:58, Charilaos Skiadas wrote:

>> Generally I want bundle stuff to be on ctrl-shift-<key>. I've now 
>> made it ctrl-shift-
> That is in general a great combo for this, but wouldn't it conflict 
> with the "Lines to enviroment" key equivalent? (Btw, Lines to 
> environment seems to be broken in b8, the TM_BUNDLE_PATH variable 
> doesn't seem to be set to anything. so it looks for 
> "/linesToList.py".)

hmm... seems TM_BUNDLE_PATH is missing for snippets, I'll fix that.

Not sure what the best key binding is though, but I do see that they 
currently clash.

>> Yes, it inserts the bracket after first word, colon being a non-word 
>> character. I've fixed it.
> Works great in b7! That is broken too in b8 I'm afraid. (I guess this 
> all has to do with TM_* variables not being inherited by commands 
> anymore?)

No -- the TM_-stuff should be unnoticed for “normal” users. And BibDesk 
does work for me with b8.

> The comment is a nice touch (though I can see it as being irritating 
> if someone doesn't want it there. I certainly didn't expect it to show 
> up the first time I ran the command). Maybe the command could check 
> whether there is a brace right after the selection, and strip it first 
> before inserting the new text? Don't know how easy that would be.

It can't really strip the comment after the selection, but it could 
change the inserted text, depending on the presence of bracket. But 
maybe it should just always strip the comment.

>> I think Thomas Schröder (who initiated the command) did actually 
>> strip the comment, so maybe that should be the default.
> It would certainly be nice if that were an option. I personally don't 
> like the comments there, they disrupt my paragraph flow, so if the 
> reference appears in the middle of a paragraph, makes it harder to 
> read (for me at least).

The option is just go change the command! :)

Currently it does (to process the res from BibDesk):
    res=`perl -pe <<<$res 's/^(.*?)(\s*)%/$1}$2%/'`

You could change it e.g. to:
    res=`awk <<<$res '{ printf("%s", $1) }'`




More information about the textmate mailing list