[SVN] r2362 (Latex)

Charilaos Skiadas cskiadas at uchicago.edu
Fri Dec 2 15:05:07 UTC 2005


On Dec 2, 2005, at 8:17 AM, Brad Miller wrote:


> Yep,
> I just verified that itemize<ctrl-<> expanded to
> \begin{itemize}
> \label{ite: }
>
> \end{itemize}
>
> as of revision 2257
>
> Looking at the diffs in the command, it is not obvious to me what  
> caused it to break.
>
>
I think I am the last one to edit the "Insert LaTeX Environment/ 
Command" command, and I added comments on the README.html file on how  
it is supposed to work, by using two environment variables  
TM_LATEX_COMMANDS and TM_LATEX_SHORTCUTS.
Your example demonstrates that it doesn't quite work that way, so  
I'll try and see what the error in the code is. A quick fix should be  
to define a variable called TM_LATEX_SHORTCUTS. That should make  
things work, please let me know if it does.

Maybe someone with more knowledge of Ruby can help me with this. The  
way it used to read there was the regexp:

commands = /^cite|footcite|footnote|label|ref|text(it|bf|tt|sf|sc)$/

what I wanted to do was make it so that the contents of  
TM_LATEX_COMMANDS are appended to this regexp, so I changed it to:

testing = ENV['TM_LATEX_COMMANDS'].to_s
commands = /^cite|footcite|footnote|label|ref|text(it|bf|tt|sf|sc)|# 
{testing}$/

which has a huge problem if TM_LATEX_COMMANDS is undefined, it seems  
that it would match almost everything then. So any idea would most  
welcome.

I was not the one responsible for removing all the individual  
environment snippets, but I have to admit that I welcome it, in favor  
of the centralized command. The LaTeX bundle had a bit out of  
proportion, so what I propose is we keep the LaTeX bundle as simple  
as possible, but offer a "professional LaTeX" bundle with a whole lot  
more snippets, or we just let people customize it themselves.

> Brad
>

Haris






More information about the textmate-dev mailing list