New vim d.vim syntax highlighting script
David Ferenczi
raggae at ferenczi.net
Mon Mar 13 11:30:55 PST 2006
Thank you very much for your work!
Recently I was playing around a bit with the d.vim script trying to get some
features work. I didn't have much time, and so were the results, as well.
Since I'm not familiar with vim scripts my assumptions and additions may be
totally wrong.
1. Highlighting operators:
I saw the operator names in the script, thus I presumed that the operators
should have also been highlighted, but somehow it didn't work for me. So I
added a quick and dirty hack:
---------8<----------------------------
" Operators
syn match dOperator "[~+!%\/=\(\)\[\]\<\>&\{\},?;.:\-\*]"
---------8<----------------------------
I know it's quite far from elegant, but it worked - at least - for me.
Could you please give me a short explanation how the operator highlighting
is intended to work?
2. Highlighting function names:
I was thinking about how to implement, and also look at other scripts to get
some ideas, but most likely the learning curve cannot be avoided in this
case. ;-) A tip could be useful though, how the correct implementation
would look like.
Regards,
David
Jason Mills wrote:
> I have uploaded a new d.vim syntax highlighting script to vim.org. Get
> it at http://www.vim.org/scripts/script.php?script_id=379
>
> Change:
>
> + Improved syntax synchronization, especially for /* */ style comments.
> + Fixed a bug that caused some identifiers and numbers to highlight as
> octal number errors (thanks to Frank Benoit).
> + Added new scope keyword.
> + Strings now know about and highlight the modifiers r, d, c, and w.
> + Changed hexadecimal floating point definitions to match current D
> spec: _ is a valid digit, i is a valid suffix, and only decimal digits
> are allowed after the hex exponent p.
> + Changed binary number definitions so integer suffixes are allowed.
>
>
> Please email me all bug reports and suggestions. Include the word vim in
> the subject line so it is filtered out from all the other spam I get.
>
> Jason
More information about the Digitalmars-d-announce
mailing list