[SVN] Revision 1189 (Latex)

Brad Miller bonelake at mac.com
Tue Jun 14 13:03:52 UTC 2005


I came back from vacation and everything in Latex is now colored in shades of blue...  So I tweaked a couple of names and fixed scopes in the LatexTheme to bring some color back.

I have many questions about the names and how they are used in the latest incarnation of the Latex Syntax.

\section{foo bar}

With the cursor in the word section, I am in the scope: 
text.latex 
  declaration.section.latex 
    support.function.section.latex
    
With the cursor in foo bar I am in the scope 
text.latex 
  declaration.section.latex 
    variable.parameter.section.latex

So If I try to style the \section command using the declaration.section scope the section command stays the same however "foo bar" changes color!  This seems different from how I remember things working not too long ago.  To change the style of \section command I must use support.function.section.latex.  Is this a bug in b12 or am I remembering wrong?

I do not understand the use of the declaration scope for this.  I think of declarations as being things like declaring variables or defining functions in statically typed rules.  In Latex I think the best use of declaration would be in preamble stuff like \newenvironment, \newcommand, \renewcommand, and the like.  So, I'd like to change the use of declaration there, but to what?  Maybe I'm just not seeing the connection.

In looking at the wiki I see that entity.name.section gives \section{name} as an example.  Is the intent of the example to say that "name" should be scoped as entity.section.name this makes good sense.  So what should the \section command be scoped as?  support.function.. seems a reasonable choice although keyword.control also seems a possibility.  That still leaves me wanting a name for the whole pattern, which doesn't seem to do us a lot of good in this case and will change when recursive includes are working....

More than enough for now.

Brad

Changed:
U   trunk/Bundles/Latex.tmbundle/Syntaxes/LaTeX.plist
U   trunk/Settings/LatexTheme.tmScopeSettings



More information about the textmate-dev mailing list