Mercurial > vim
comparison runtime/syntax/resolv.vim @ 834:5117153003bd v7.0e
updated for version 7.0e
author | vimboss |
---|---|
date | Sun, 16 Apr 2006 18:30:08 +0000 |
parents | 3fc0f57ecb91 |
children | 8dcf3ea92b63 |
comparison
equal
deleted
inserted
replaced
833:52d17d53b555 | 834:5117153003bd |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: resolver configuration file | 2 " Language: resolver configuration file |
3 " Maintaner: Radu Dineiu <littledragon@altern.org> | 3 " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> |
4 " URL: http://ld.yi.org/vim/resolv.vim | 4 " Original Maintaner: Radu Dineiu <littledragon@altern.org> |
5 " ChangeLog: http://ld.yi.org/vim/resolv.ChangeLog | 5 " License: This file can be redistribued and/or modified under the same terms |
6 " Last Change: 2003 May 11 | 6 " as Vim itself. |
7 " Version: 0.1 | 7 " URL: http://trific.ath.cx/Ftp/vim/syntax/resolv.vim |
8 " Last Change: 2006-04-16 | |
8 | 9 |
9 if version < 600 | 10 if version < 600 |
10 syntax clear | 11 syntax clear |
11 elseif exists("b:current_syntax") | 12 elseif exists("b:current_syntax") |
12 finish | 13 finish |
13 endif | 14 endif |
14 | 15 |
15 " Errors, comments and operators | 16 " Errors, comments and operators |
16 syn match resolvError /./ | 17 syn match resolvError /./ |
17 syn match resolvNull /^\s*$/ | 18 syn match resolvComment /\s*[#;].*$/ |
18 syn match resolvComment /^\s*#.*$/ | |
19 syn match resolvOperator /[\/:]/ contained | 19 syn match resolvOperator /[\/:]/ contained |
20 | 20 |
21 " IP | 21 " IP |
22 | |
23 syn cluster resolvIPCluster contains=resolvIPError,resolvIPSpecial | 22 syn cluster resolvIPCluster contains=resolvIPError,resolvIPSpecial |
24 syn match resolvIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained | 23 syn match resolvIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained |
25 syn match resolvIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained | 24 syn match resolvIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained |
26 | 25 |
27 " General | 26 " General |
28 syn match resolvIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@resolvIPCluster | 27 syn match resolvIP contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}/ contains=@resolvIPCluster |
29 syn match resolvIPNetmask contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?/ contains=resolvOperator,@resolvIPCluster | 28 syn match resolvIPNetmask contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?/ contains=resolvOperator,@resolvIPCluster |
30 syn match resolvHostname contained /\w\{-}\.[-0-9A-Za-z_\.]*/ | 29 syn match resolvHostname contained /\w\{-}\.[-0-9A-Za-z_\.]*/ |
31 | 30 |
32 " Particular | 31 " Particular |
33 syn match resolvIPNameserver contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\s\|$\)\)\{1,3}/ contains=@resolvIPCluster | 32 syn match resolvIPNameserver contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\s\|$\)\)\+/ contains=@resolvIPCluster |
34 syn match resolvHostnameSearch contained /\%(\w\{-}\.[-0-9A-Za-z_\.]\{-}\%(\s\|$\)\)\{1,6}/ | 33 syn match resolvHostnameSearch contained /\%(\%([-0-9A-Za-z_]\+\.\)*[-0-9A-Za-z_]\+\.\?\%(\s\|$\)\)\+/ |
35 syn match resolvIPNetmaskSortList contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?\%(\s\|$\)\)\{1,10}/ contains=resolvOperator,@resolvIPCluster | 34 syn match resolvIPNetmaskSortList contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?\%(\s\|$\)\)\+/ contains=resolvOperator,@resolvIPCluster |
36 | 35 |
37 " Identifiers | 36 " Identifiers |
38 syn match resolvNameserver /^nameserver / nextgroup=resolvIPNameserver | 37 syn match resolvNameserver /^\s*nameserver\>/ nextgroup=resolvIPNameserver skipwhite |
39 syn match resolvDomain /^domain / nextgroup=resolvHostname | 38 syn match resolvLwserver /^\s*lwserver\>/ nextgroup=resolvIPNameserver skipwhite |
40 syn match resolvSearch /^search / nextgroup=resolvHostnameSearch | 39 syn match resolvDomain /^\s*domain\>/ nextgroup=resolvHostname skipwhite |
41 syn match resolvSortList /^sortlist / nextgroup=resolvIPNetmaskSortList | 40 syn match resolvSearch /^\s*search\>/ nextgroup=resolvHostnameSearch skipwhite |
42 syn match resolvOptions /^options / nextgroup=resolvOption | 41 syn match resolvSortList /^\s*sortlist\>/ nextgroup=resolvIPNetmaskSortList skipwhite |
42 syn match resolvOptions /^\s*options\>/ nextgroup=resolvOption skipwhite | |
43 | 43 |
44 " Options | 44 " Options |
45 syn match resolvOption /\%(debug\|ndots:\d\)/ contained contains=resolvOperator | 45 " FIXME: The manual page and the source code do not exactly agree on the set |
46 " of allowed options | |
47 syn match resolvOption /\<\%(debug\|no_tld_query\|rotate\|no-check-names\|inet6\)\>/ contained nextgroup=resolvOption skipwhite | |
48 syn match resolvOption /\<\%(ndots\|timeout\|attempts\):\d\+\>/ contained contains=resolvOperator nextgroup=resolvOption skipwhite | |
46 | 49 |
47 " Additional errors | 50 " Additional errors |
48 syn match resolvError /^search .\{257,}/ | 51 syn match resolvError /^search .\{257,}/ |
49 syn match resolvNull /\s\{1,}$/ | |
50 | 52 |
51 if version >= 508 || !exists("did_config_syntax_inits") | 53 if version >= 508 || !exists("did_config_syntax_inits") |
52 if version < 508 | 54 if version < 508 |
53 let did_config_syntax_inits = 1 | 55 let did_config_syntax_inits = 1 |
54 command! -nargs=+ HiLink hi link <args> | 56 command! -nargs=+ HiLink hi link <args> |
64 HiLink resolvIPNameserver Number | 66 HiLink resolvIPNameserver Number |
65 HiLink resolvHostnameSearch String | 67 HiLink resolvHostnameSearch String |
66 HiLink resolvIPNetmaskSortList Number | 68 HiLink resolvIPNetmaskSortList Number |
67 | 69 |
68 HiLink resolvNameServer Identifier | 70 HiLink resolvNameServer Identifier |
71 HiLink resolvLwserver Identifier | |
69 HiLink resolvDomain Identifier | 72 HiLink resolvDomain Identifier |
70 HiLink resolvSearch Identifier | 73 HiLink resolvSearch Identifier |
71 HiLink resolvSortList Identifier | 74 HiLink resolvSortList Identifier |
72 HiLink resolvOptions Identifier | 75 HiLink resolvOptions Identifier |
73 | 76 |