[TxMt] LaTeX bundle snippet tab triggers?

Charilaos Skiadas cskiadas at uchicago.edu
Sat May 7 18:31:00 UTC 2005


On May 7, 2005, at 1:04 PM, Allan Odgaard wrote:

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

How about shift-ctrl-T ? Is that taken? I tend to think that T is more 
appropriate for LaTeX than L, or at least just as fine, and it will be 
natural to anyone using cmd-T in TeXShop (I think it was cmd-T, haven't 
used TeXShop in a while).
>>> 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.

Hm, checked again and it works fine now. I wonder what my problem was 
before...
There is the following behavior I can't understand though. In my case I 
have a comment that says:
% Kashiwara, ${B}$-functions and holonomic systems. {R}ationality of 
roots of ${B}$-functions
and it becomes
% Kashiwara, B}-functions and holonomic systems. {R}ationality of roots 
of B}-functions
Not really a big deal, especially since I changed the command and don't 
keep the comment, but I am just curious what happens to the dollar 
signs and the left brace.

>> 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! :)

Already did, and now it works great! Thanks for the suggestion.
One thing though: If i press cancel instead of selecting a reference, 
it replaces the selection with the word "false".
One more suggestion. How about, if there is no selection and no current 
word, it just produces a list of all the bibliography items?

> 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) }'`
>
Haris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2927 bytes
Desc: not available
URL: <http://lists.macromates.com/textmate/attachments/20050507/0ae40e1f/attachment.bin>


More information about the textmate mailing list