Mercurial > hg > RemoteEditor > vim7
comparison runtime/syntax/rpcgen.vim @ 0:76efa0be13f1
Initial revision
author | atsuki |
---|---|
date | Sat, 10 Nov 2007 15:07:22 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:76efa0be13f1 |
---|---|
1 " Vim syntax file | |
2 " Language: rpcgen | |
3 " Maintainer: Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz> | |
4 " Last Change: Sep 06, 2005 | |
5 " Version: 8 | |
6 " URL: http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax | |
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 " Read the C syntax to start with | |
17 if version < 600 | |
18 source <sfile>:p:h/c.vim | |
19 else | |
20 runtime! syntax/c.vim | |
21 endif | |
22 | |
23 syn keyword rpcProgram program skipnl skipwhite nextgroup=rpcProgName | |
24 syn match rpcProgName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcProgZone | |
25 syn region rpcProgZone contained matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\(\d\+\|0x[23]\x\{7}\)\s*;"me=e-1 contains=rpcVersion,cComment,rpcProgNmbrErr | |
26 syn keyword rpcVersion contained version skipnl skipwhite nextgroup=rpcVersName | |
27 syn match rpcVersName contained "\<\i\I*\>" skipnl skipwhite nextgroup=rpcVersZone | |
28 syn region rpcVersZone contained matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\d\+\s*;"me=e-1 contains=cType,cStructure,cStorageClass,rpcDecl,rpcProcNmbr,cComment | |
29 syn keyword rpcDecl contained string | |
30 syn match rpcProcNmbr contained "=\s*\d\+;"me=e-1 | |
31 syn match rpcProgNmbrErr contained "=\s*0x[^23]\x*"ms=s+1 | |
32 syn match rpcPassThru "^\s*%.*$" | |
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_rpcgen_syntax_inits") | |
38 if version < 508 | |
39 let did_rpcgen_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 rpcProgName rpcName | |
46 HiLink rpcProgram rpcStatement | |
47 HiLink rpcVersName rpcName | |
48 HiLink rpcVersion rpcStatement | |
49 | |
50 HiLink rpcDecl cType | |
51 HiLink rpcPassThru cComment | |
52 | |
53 HiLink rpcName Special | |
54 HiLink rpcProcNmbr Delimiter | |
55 HiLink rpcProgNmbrErr Error | |
56 HiLink rpcStatement Statement | |
57 | |
58 delcommand HiLink | |
59 endif | |
60 | |
61 let b:current_syntax = "rpcgen" | |
62 | |
63 " vim: ts=8 |