Mercurial > projects > doodle
comparison nobuild/d.vim @ 99:ad672ab258c5
Version 0.22 of d.vim
author | David Bryant <bagnose@gmail.com> |
---|---|
date | Wed, 06 Oct 2010 13:03:38 +1030 |
parents | cd0c9a4a7e44 |
children |
comparison
equal
deleted
inserted
replaced
98:cd0c9a4a7e44 | 99:ad672ab258c5 |
---|---|
1 " Vim syntax file for the D programming language (version 1.053 and 2.047). | 1 " Vim syntax file for the D programming language (version 1.053 and 2.047). |
2 " | 2 " |
3 " Language: D | 3 " Language: D |
4 " Maintainer: Jesse Phillips <Jesse.K.Phillips+D@gmail.com> | 4 " Maintainer: Jesse Phillips <Jesse.K.Phillips+D@gmail.com> |
5 " Last Change: 2010 Aug 17 | 5 " Last Change: 2010 Sep 21 |
6 " Version: 0.20 | 6 " Version: 0.22 |
7 " | 7 " |
8 " Contributors: | 8 " Contributors: |
9 " - Jason Mills <jasonmills@nf.sympatico.ca>: original Maintainer | 9 " - Jason Mills <jasonmills@nf.sympatico.ca>: original Maintainer |
10 " - Shougo Matsushita <Shougo.Matsu@gmail.com>: updates for latest 2.047 highlighting | |
11 " - Kirk McDonald: version 0.17 updates, with minor modifications | 10 " - Kirk McDonald: version 0.17 updates, with minor modifications |
12 " (http://paste.dprogramming.com/dplmb7qx?view=hidelines) | 11 " (http://paste.dprogramming.com/dplmb7qx?view=hidelines) |
13 " - Tim Keating: patch to fix a bug in highlighting the `\` literal | 12 " - Tim Keating: patch to fix a bug in highlighting the `\` literal |
14 " - Frank Benoit: Fixed a bug that caused some identifiers and numbers to highlight as octal number errors. | 13 " - Frank Benoit: Fixed a bug that caused some identifiers and numbers to highlight as octal number errors. |
14 " - Shougo Matsushita <Shougo.Matsu@gmail.com>: updates for latest 2.047 highlighting | |
15 " - Ellery Newcomer: Fixed some highlighting bugs. | |
16 " - Steven N. Oliver: #! highlighting | |
15 " | 17 " |
16 " Please email me with bugs, comments, and suggestions. | 18 " Please email me with bugs, comments, and suggestions. |
17 " | 19 " |
18 " Options: | 20 " Options: |
19 " d_comment_strings - Set to highlight strings and numbers in comments. | 21 " d_comment_strings - Set to highlight strings and numbers in comments. |
83 syn keyword dType void ushort int uint long ulong float | 85 syn keyword dType void ushort int uint long ulong float |
84 syn keyword dType byte ubyte double bit char wchar ucent cent | 86 syn keyword dType byte ubyte double bit char wchar ucent cent |
85 syn keyword dType short bool dchar wstring dstring | 87 syn keyword dType short bool dchar wstring dstring |
86 syn keyword dType real ireal ifloat idouble | 88 syn keyword dType real ireal ifloat idouble |
87 syn keyword dType creal cfloat cdouble | 89 syn keyword dType creal cfloat cdouble |
88 syn keyword dDebug deprecated unittest | 90 syn keyword dDebug deprecated unittest invariant |
89 syn keyword dExceptions throw try catch finally | 91 syn keyword dExceptions throw try catch finally |
90 syn keyword dScopeDecl public protected private export | 92 syn keyword dScopeDecl public protected private export |
91 syn keyword dStatement debug return with | 93 syn keyword dStatement debug return with |
92 syn keyword dStatement function delegate __traits mixin macro | 94 syn keyword dStatement function delegate __traits mixin macro |
93 syn keyword dStorageClass in out inout ref lazy body | 95 syn keyword dStorageClass in out inout ref lazy body |
106 syn keyword dVersionIdentifier contained LittleEndian BigEndian D_Coverage | 108 syn keyword dVersionIdentifier contained LittleEndian BigEndian D_Coverage |
107 syn keyword dVersionIdentifier contained D_Ddoc D_InlineAsm_X86 | 109 syn keyword dVersionIdentifier contained D_Ddoc D_InlineAsm_X86 |
108 syn keyword dVersionIdentifier contained D_InlineAsm_X86_64 D_LP64 D_PIC | 110 syn keyword dVersionIdentifier contained D_InlineAsm_X86_64 D_LP64 D_PIC |
109 syn keyword dVersionIdentifier contained unittest D_Version2 none all | 111 syn keyword dVersionIdentifier contained unittest D_Version2 none all |
110 | 112 |
113 " Highlight the sharpbang | |
114 syn match dSharpBang "\%^#!.*" display | |
115 | |
111 " Attributes/annotations | 116 " Attributes/annotations |
112 syn match dAnnotation "@[_$a-zA-Z][_$a-zA-Z0-9_]*\>" contains=dAttribute | 117 syn match dAnnotation "@[_$a-zA-Z][_$a-zA-Z0-9_]*\>" contains=dAttribute |
113 | 118 |
114 " Version Identifiers | 119 " Version Identifiers |
115 syn match dVersion "version\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+7 contains=dVersionIdentifier | 120 syn match dVersion "[^.]version" nextgroup=dVersionInside |
116 syn match dVersion "[^.]\s*\<version\>" | 121 syn match dVersion "^version" nextgroup=dVersionInside |
117 syn match dVersion "^\<version\>" | 122 syn match dVersionInside "([_a-zA-Z][_a-zA-Z0-9]*\>" transparent contained contains=dVersionIdentifier |
123 | |
124 " Scope StorageClass | |
125 syn match dStorageClass "scope" | |
118 | 126 |
119 " Scope Identifiers | 127 " Scope Identifiers |
120 syn match dScope "scope\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+5 contains=dScopeIdentifier | 128 syn match dScope "scope\s*([_a-zA-Z][_a-zA-Z0-9]*\>"he=s+5 contains=dScopeIdentifier |
121 | 129 |
122 " String is a statement and a module name. | 130 " String is a statement and a module name. |
123 syn match dAssert "^string" | 131 syn match dType "^string" |
124 syn match dAssert "[^.]\s*\<string\>"ms=s+1 | 132 syn match dType "[^.]\s*\<string\>"ms=s+1 |
125 | 133 |
126 " Assert is a statement and a module name. | 134 " Assert is a statement and a module name. |
127 syn match dAssert "^assert" | 135 syn match dAssert "^assert" |
128 syn match dAssert "[^.]\s*\<assert\>"ms=s+1 | 136 syn match dAssert "[^.]\s*\<assert\>"ms=s+1 |
129 | 137 |
317 hi def link dBlockComment Comment | 325 hi def link dBlockComment Comment |
318 hi def link dNestedComment Comment | 326 hi def link dNestedComment Comment |
319 hi def link dExternal Include | 327 hi def link dExternal Include |
320 hi def link dPragma PreProc | 328 hi def link dPragma PreProc |
321 hi def link dAnnotation PreProc | 329 hi def link dAnnotation PreProc |
330 hi def link dSharpBang PreProc | |
322 hi def link dAttribute StorageClass | 331 hi def link dAttribute StorageClass |
323 hi def link dIdentifier Identifier | 332 hi def link dIdentifier Identifier |
324 hi def link dVersionIdentifier Identifier | 333 hi def link dVersionIdentifier Identifier |
325 hi def link dVersion dStatement | 334 hi def link dVersion dStatement |
326 hi def link dScopeIdentifier dStatement | 335 hi def link dScopeIdentifier dStatement |