[TxMt] Fwd: Latex Bundle Useability (and patch)

Peter Gerdes truepath at infiniteinjury.org
Sat Nov 17 21:34:03 UTC 2007


On Nov 5, 2007, at 3:52 AM, Charilaos Skiadas wrote:
>>
>> Often I will be editing an existing tex file and need to add  
>> something like $\Gamma_{\alpha+1}(\sigma)\concat\tau$.  This
>
> Have you tried using the "Insert Symbol based on Current Word"  
> command? For instance, instead of typing \ followed by Gamma, you  
> type:
> G
> and then press cmd-\ in my case, and it becomes \Gamma.
>
>

I make quite heavy use of custom commands that I've defined making it  
pretty hard to keep all of them as snippets.  Besides I find that  
when I'm typing it's a HUGE slowdown if I have to take stop touch  
typing and press a control sequence.  I could use tab completion but  
since I tend to create new commands for common functions in  
particular files this would mean changing snippets for every file  
(this would be a nice feature but I don't have the time to implement  
it).

The latex mode should really just work.  I should be able to type in  
textmate the same way I do in a plain tex editor and have it work  
well and if I can help make that the case I'd like to help..

>
> As you say, it would be quite controversial to replace this,  
> especially thinking of people working with collaborators or on old  
> latex files. I personally have made a set of three commands, kept  
> in a separate grammar, that help me with this:
>

Great, thanks.  These are helpful.


>>
>>
> That would probably work in fact. I am puzzled however. This should  
> be slowing you down only if you have many begin-end blocks on the  
> same line, and I don't tend to see that often. What begin-end  
> blocks are you using? If you use the "Insert Environment Based On  
> Current Word" command to generate them, then they will span  
> multiple lines instead.
>

I'm not using any begin end blocks on most lines (though I do jump in  
and out of math mode several times and use a bunch of custom  
commands, often with nested arguments).  The reason I felt that these  
matches would be problematic is that even if they don't actually  
match ruby (or whatever regex engine is being used) has to check them  
for a match.  Maybe the difference isn't enough to be noticeable but  
my thinking was that by pinning the begin end statements to the  
begining of the line we wouldn't be forcing the regex engine to start  
a new attempted match whenever it encounters a space (and with  
multiple spaces it might even start backtracking if it doesn't  
compile down to a DFA).

Anyway thanks for the commands.

Peter



More information about the textmate mailing list