On Jan 22, 2006, at 2:37 PM, Gary L. Gray wrote:
s/(?<=\\|sub)sub/ /g; # replace all leading "sub" with an em-space
Try to replace the s in the first sub with (s|S)This tells the regexp engine to match either an s or an S at that point.
Have a look at this document for more on regular expressions used in textmate:
Then you also need to change the latex syntax to recognize your (sub)sections as having scope meta.section.latex
In particular, in the LaTeX language file, you will find the line:
begin = '((\\(?:(?:sub)*section|chapter|paragraph|part))(\*?)(?:(\[)[^\[]*?(\]))??(\{))';
near the top.If you change the first "s" there to (s|S) instead, that might do it (haven't tested it).
This will also be matching stuff like \SubSubsection, I hope that's alright.