7
|
1 " Vim syntax file
|
|
2 " Language: Microsoft Module-Definition (.def) File
|
1621
|
3 " Orig Author: Rob Brady <robb@datatone.com>
|
|
4 " Maintainer: Wu Yongwei <wuyongwei@gmail.com>
|
2034
|
5 " Last Change: $Date: 2007/10/02 13:51:24 $
|
|
6 " $Revision: 1.2 $
|
7
|
7
|
|
8 " For version 5.x: Clear all syntax items
|
|
9 " For version 6.x: Quit when a syntax file was already loaded
|
|
10 if version < 600
|
|
11 syntax clear
|
|
12 elseif exists("b:current_syntax")
|
|
13 finish
|
|
14 endif
|
|
15
|
|
16 syn case ignore
|
|
17
|
|
18 syn match defComment ";.*"
|
|
19
|
|
20 syn keyword defKeyword LIBRARY STUB EXETYPE DESCRIPTION CODE WINDOWS DOS
|
|
21 syn keyword defKeyword RESIDENTNAME PRIVATE EXPORTS IMPORTS SEGMENTS
|
|
22 syn keyword defKeyword HEAPSIZE DATA
|
|
23 syn keyword defStorage LOADONCALL MOVEABLE DISCARDABLE SINGLE
|
|
24 syn keyword defStorage FIXED PRELOAD
|
|
25
|
1621
|
26 syn match defOrdinal "\s\+@\d\+"
|
7
|
27
|
|
28 syn region defString start=+'+ end=+'+
|
|
29
|
|
30 syn match defNumber "\d+"
|
|
31 syn match defNumber "0x\x\+"
|
|
32
|
|
33
|
|
34 " Define the default highlighting.
|
|
35 " For version 5.7 and earlier: only when not done already
|
|
36 " For version 5.8 and later: only when an item doesn't have highlighting yet
|
|
37 if version >= 508 || !exists("did_def_syntax_inits")
|
|
38 if version < 508
|
|
39 let did_def_syntax_inits = 1
|
|
40 command -nargs=+ HiLink hi link <args>
|
|
41 else
|
|
42 command -nargs=+ HiLink hi def link <args>
|
|
43 endif
|
|
44
|
|
45 HiLink defComment Comment
|
|
46 HiLink defKeyword Keyword
|
|
47 HiLink defStorage StorageClass
|
|
48 HiLink defString String
|
|
49 HiLink defNumber Number
|
|
50 HiLink defOrdinal Operator
|
|
51
|
|
52 delcommand HiLink
|
|
53 endif
|
|
54
|
|
55 let b:current_syntax = "def"
|
|
56
|
|
57 " vim: ts=8
|