[SVN] Naming convention
Chris Thomas
chris at cjack.com
Sat Apr 23 17:50:09 UTC 2005
On Apr 23, 2005, at 4:42 AM, Allan Odgaard wrote:
> On Apr 23, 2005, at 12:33, Mats Persson wrote:
>
>> 1. Markup languages like <html> or <xml> is described as
>> "keyword.markup". Should "markup" not be its own root just like
>> "variable" has become ??
>
> I think Chris can probably give a better answer, but I'd think it's
> because with a very basic styling (e.g. of only keyword, constant,
> variable, string and comment), the tag-name should probably be
> styled like a keyword.
Right, the idea is to minimize the amount of (thinking|work) somebody
has to do to make a fully usable basic theme.
> declaration.tag
> tag-name
> tag-attribute
> tag-value
Sounds good to me.
> Looking at these lists though, it screams “dot-separated hierarchy”
> for the fragments of the three types of declaration, so instead we
> get: name.class, name.function, name.tag -- that way, styling only
> “name” will be enough to give colors to all 3 elements (which are
> rarely present in the same source, so that's probably good enough
> for most).
Yes, please.
>> 2. "Variable" in my world is $variable (in PHP), @variable in
>> Ruby, whereas INT_MAX would be a "constant" in my book. I guess I
>> might be missing something here ;-)
>
> Yes, INT_MAX is also a constant IMHO, I just couldn't think of a
> variable, because in the majority of languages I use, a variable is
> not possible to markup. But I see the picture now :)
"Constant" is a different story. Currently, "constant" actually means
"literal", and probably we should delete "constant" and have
"literal" and "variable.constant" instead.
Chris
More information about the textmate-dev
mailing list