# HG changeset patch # User David Bryant # Date 1286332418 -37800 # Node ID ad672ab258c5fe97b4e4ca92c86880092018655d # Parent cd0c9a4a7e44d26512b78d512d267df43c54884a Version 0.22 of d.vim diff -r cd0c9a4a7e44 -r ad672ab258c5 nobuild/d.vim --- a/nobuild/d.vim Tue Aug 31 10:03:37 2010 +0930 +++ b/nobuild/d.vim Wed Oct 06 13:03:38 2010 +1030 @@ -2,16 +2,18 @@ " " Language: D " Maintainer: Jesse Phillips -" Last Change: 2010 Aug 17 -" Version: 0.20 +" Last Change: 2010 Sep 21 +" Version: 0.22 " " Contributors: " - Jason Mills : original Maintainer -" - Shougo Matsushita : updates for latest 2.047 highlighting " - Kirk McDonald: version 0.17 updates, with minor modifications " (http://paste.dprogramming.com/dplmb7qx?view=hidelines) " - Tim Keating: patch to fix a bug in highlighting the `\` literal " - Frank Benoit: Fixed a bug that caused some identifiers and numbers to highlight as octal number errors. +" - Shougo Matsushita : updates for latest 2.047 highlighting +" - Ellery Newcomer: Fixed some highlighting bugs. +" - Steven N. Oliver: #! highlighting " " Please email me with bugs, comments, and suggestions. " @@ -85,7 +87,7 @@ syn keyword dType short bool dchar wstring dstring syn keyword dType real ireal ifloat idouble syn keyword dType creal cfloat cdouble -syn keyword dDebug deprecated unittest +syn keyword dDebug deprecated unittest invariant syn keyword dExceptions throw try catch finally syn keyword dScopeDecl public protected private export syn keyword dStatement debug return with @@ -108,20 +110,26 @@ syn keyword dVersionIdentifier contained D_InlineAsm_X86_64 D_LP64 D_PIC syn keyword dVersionIdentifier contained unittest D_Version2 none all +" Highlight the sharpbang +syn match dSharpBang "\%^#!.*" display + " Attributes/annotations syn match dAnnotation "@[_$a-zA-Z][_$a-zA-Z0-9_]*\>" contains=dAttribute " Version Identifiers -syn match dVersion "version\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+7 contains=dVersionIdentifier -syn match dVersion "[^.]\s*\" -syn match dVersion "^\" +syn match dVersion "[^.]version" nextgroup=dVersionInside +syn match dVersion "^version" nextgroup=dVersionInside +syn match dVersionInside "([_a-zA-Z][_a-zA-Z0-9]*\>" transparent contained contains=dVersionIdentifier + +" Scope StorageClass +syn match dStorageClass "scope" " Scope Identifiers syn match dScope "scope\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+5 contains=dScopeIdentifier " String is a statement and a module name. -syn match dAssert "^string" -syn match dAssert "[^.]\s*\"ms=s+1 +syn match dType "^string" +syn match dType "[^.]\s*\"ms=s+1 " Assert is a statement and a module name. syn match dAssert "^assert" @@ -319,6 +327,7 @@ hi def link dExternal Include hi def link dPragma PreProc hi def link dAnnotation PreProc +hi def link dSharpBang PreProc hi def link dAttribute StorageClass hi def link dIdentifier Identifier hi def link dVersionIdentifier Identifier