[TxMt] Improving SymbolPopup for LaTeX?
Charilaos Skiadas
cskiadas at uchicago.edu
Sat Dec 3 00:00:55 UTC 2005
Ok, managed to get it to work, almost.
1) First of all, you need to create a new preferences item. WHY? I'd
really like to know that.
2) Second, any changes you make only take effect after you closed the
bundle editor. Again, WHY? That's not the case for commands and
snippets and stuff.
3) This is the code I used now, just paste it into a "Symbol List
copy" or whatnot, with scope "text.latex meta.scope" :
/* preferences */
{ showInSymbolList = 1;
symbolTransformation = 's/^(\s*)\\section\{(.+)\}/$1 $2/; s/^
(\s*)\\subsection\{(.+)\}/$1\t $2/'; s/^(\s*)\\subsubsection\{(.+)\}/
$1 \t \t $2/';}
two questions on that:
a) Why don't the spaces that $1 catches being shown? They are in the
python thing.
b) the \subsubsection rule gives me: \subsubsection{stuff} instead of
just "stuff".
Other than that, it works well. The tabs inserted by \t get
interpreted, even though spaces seem not to.
Haris
More information about the textmate
mailing list