[SVN] Final naming revision (hopefully)
Allan Odgaard
allan at macromates.com
Thu May 26 08:31:21 UTC 2005
Okay, I spent some time trying to revise this naming system (again),
hopefully this will be the final revision and I'll try to apply these
names later today.
After this I want to make the rule that ALL future names MUST have
one of these as the root. I have added “other” children for when it
doesn't fit an existing category. That way it'll be easy to see what
stuff needs to be conssidered for future (minor) revisions of the
naming scheme.
keyword.flow -- continue, while, if, return,
break, try, do, end, throw, …
keyword.operator -- instanceof, dynamic_cast, and,
or, not, …
keyword.other -- «needs examples»
storage.type -- class, function, int, var, …
storage.modifier -- static, final, abstract, …
storage.other -- «needs examples»
support.function -- NSLog, NSBeep, NSRectFill, …
support.class -- NSWindow, NSString, …
support.type -- NSRect, …
support.constant -- NSZeroRect, NSNumericPadKeyMask, …
support.other -- «needs examples»
constant.numeric -- 42, 1.3f, 0x4AB1U, …
constant.character -- <, \e, \031, …
constant.language -- true, false, nil, YES, NO, …
constant.other -- «needs examples»
comment.line.double-slash -- // comment
comment.line.double-dash -- -- comment
comment.line.number-sign -- # comment
comment.line.percentage -- % comment
comment.line.<character> -- <character> comment
comment.block -- /* block */, <!-- block -->
comment.documentation -- embedded documentation
string.quoted.single -- 'foo'
string.quoted.double -- "foo"
string.quoted.tripple -- """Python"""
string.quoted.other -- $'shell', %s{...}
string.unquoted -- here-docs and here-strings
string.interpolated -- `date`, $(pwd)
string.regex -- /(\w+)/
string.other
variable.parameter -- def my_fun (parm)
variable.other -- @varName, $varName
invalid.illegal -- <pre>this & that</pre>
invalid.deprecated -- html <b>strict</b>
entity.name.function -- def my_function
entity.name.class -- class my_class
entity.name.tag -- <tag-name>
entity.name.section -- \section{name}
entity.other.inherited-class --
entity.other.attribute-name
entity.other
markup.underline
markup.underline.link
markup.bold
markup.italic
markup.other
declaration.function
declaration.class
declaration.tag
declaration
other
dummy
Declaration is normally unstyled and serves mostly to allow
associationg scope-specific settings with various constructs. Dummy
is also unstyled and ment mostly as a comment, e.g. when you match
something only so that another rule won't wrongly match it (like
swallow patterns).
The top-level other should rarely be used since each category has an
other. This is really for specific languages that have their own set
of styles, like the diff language.
More information about the textmate-dev
mailing list