Vim is setup as:
On Friday, 27 March 2015 at 10:34:58 UTC, Jacob Carlborg wrote:
I'm currently updating the TextMate D bundle for D2. I have a
couple of questions for how to highlighting some specific code
or how other editors/IDE's highlight them.
* "this" in constructor
this () {}
Keyword (function should be fine, vim doesn't highlight those)
In TextMate functions/methods are highlighted, should this be
highlighted as a keyword or as a method?
* "this" in copy constructor
this (this) {}
Keyword
The "this" parameter, should that be highlighted as a keyword
or as a parameter?
* The "__ctfe" variable
if (__ctfe) {}
How should this highlighted? I see a couple of alternatives:
- not at all
- as a keyword
- as a special recognized built-in symbol, similar to __LINE__
- as a special recognized library symbol. For example, in the C
bundle many of functions in the standard library are specially
recognized and highlighted differently. This might not apply
here since it's not a library symbol
Statement [e.g. debug, return, function, with] (that needs fixed)
Probably should be Identifier for consistency [e.g. _arugments,
__vptr, _ctor]
Which I guess is your third (special recognized built-in), though
__LINE__ is a constant in Vim's highlighting [e.g. null,
__VERSION__].
* __traits identifiers
__traits(allMembers, Foo);
In this case "allMembers". Basically the same question and
alternatives as for the "__ctfe" variable.
Identifier
* Predefined version identifiers
version (OSX) {}
Again, same a question and alternatives as for the "__ctfe"
variable.
Identifier
* Extern identifiers
extern (C)
Again, same a question and alternatives as for the "__ctfe"
variable.
Identifier