forked from aniani/vim
updated for version 7.0e
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
" Vim syntax file
|
||||
" Language: resolver configuration file
|
||||
" Maintaner: Radu Dineiu <littledragon@altern.org>
|
||||
" URL: http://ld.yi.org/vim/resolv.vim
|
||||
" ChangeLog: http://ld.yi.org/vim/resolv.ChangeLog
|
||||
" Last Change: 2003 May 11
|
||||
" Version: 0.1
|
||||
" Language: resolver configuration file
|
||||
" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
|
||||
" Original Maintaner: Radu Dineiu <littledragon@altern.org>
|
||||
" License: This file can be redistribued and/or modified under the same terms
|
||||
" as Vim itself.
|
||||
" URL: http://trific.ath.cx/Ftp/vim/syntax/resolv.vim
|
||||
" Last Change: 2006-04-16
|
||||
|
||||
if version < 600
|
||||
syntax clear
|
||||
@@ -14,12 +15,10 @@ endif
|
||||
|
||||
" Errors, comments and operators
|
||||
syn match resolvError /./
|
||||
syn match resolvNull /^\s*$/
|
||||
syn match resolvComment /^\s*#.*$/
|
||||
syn match resolvComment /\s*[#;].*$/
|
||||
syn match resolvOperator /[\/:]/ contained
|
||||
|
||||
" IP
|
||||
|
||||
syn cluster resolvIPCluster contains=resolvIPError,resolvIPSpecial
|
||||
syn match resolvIPError /\%(\d\{4,}\|25[6-9]\|2[6-9]\d\|[3-9]\d\{2}\)[\.0-9]*/ contained
|
||||
syn match resolvIPSpecial /\%(127\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)/ contained
|
||||
@@ -30,23 +29,26 @@ syn match resolvIPNetmask contained /\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1
|
||||
syn match resolvHostname contained /\w\{-}\.[-0-9A-Za-z_\.]*/
|
||||
|
||||
" Particular
|
||||
syn match resolvIPNameserver contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\s\|$\)\)\{1,3}/ contains=@resolvIPCluster
|
||||
syn match resolvHostnameSearch contained /\%(\w\{-}\.[-0-9A-Za-z_\.]\{-}\%(\s\|$\)\)\{1,6}/
|
||||
syn match resolvIPNetmaskSortList contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?\%(\s\|$\)\)\{1,10}/ contains=resolvOperator,@resolvIPCluster
|
||||
syn match resolvIPNameserver contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\s\|$\)\)\+/ contains=@resolvIPCluster
|
||||
syn match resolvHostnameSearch contained /\%(\%([-0-9A-Za-z_]\+\.\)*[-0-9A-Za-z_]\+\.\?\%(\s\|$\)\)\+/
|
||||
syn match resolvIPNetmaskSortList contained /\%(\%(\d\{1,4}\.\)\{3}\d\{1,4}\%(\/\%(\%(\d\{1,4}\.\)\{,3}\d\{1,4}\)\)\?\%(\s\|$\)\)\+/ contains=resolvOperator,@resolvIPCluster
|
||||
|
||||
" Identifiers
|
||||
syn match resolvNameserver /^nameserver / nextgroup=resolvIPNameserver
|
||||
syn match resolvDomain /^domain / nextgroup=resolvHostname
|
||||
syn match resolvSearch /^search / nextgroup=resolvHostnameSearch
|
||||
syn match resolvSortList /^sortlist / nextgroup=resolvIPNetmaskSortList
|
||||
syn match resolvOptions /^options / nextgroup=resolvOption
|
||||
syn match resolvNameserver /^\s*nameserver\>/ nextgroup=resolvIPNameserver skipwhite
|
||||
syn match resolvLwserver /^\s*lwserver\>/ nextgroup=resolvIPNameserver skipwhite
|
||||
syn match resolvDomain /^\s*domain\>/ nextgroup=resolvHostname skipwhite
|
||||
syn match resolvSearch /^\s*search\>/ nextgroup=resolvHostnameSearch skipwhite
|
||||
syn match resolvSortList /^\s*sortlist\>/ nextgroup=resolvIPNetmaskSortList skipwhite
|
||||
syn match resolvOptions /^\s*options\>/ nextgroup=resolvOption skipwhite
|
||||
|
||||
" Options
|
||||
syn match resolvOption /\%(debug\|ndots:\d\)/ contained contains=resolvOperator
|
||||
" FIXME: The manual page and the source code do not exactly agree on the set
|
||||
" of allowed options
|
||||
syn match resolvOption /\<\%(debug\|no_tld_query\|rotate\|no-check-names\|inet6\)\>/ contained nextgroup=resolvOption skipwhite
|
||||
syn match resolvOption /\<\%(ndots\|timeout\|attempts\):\d\+\>/ contained contains=resolvOperator nextgroup=resolvOption skipwhite
|
||||
|
||||
" Additional errors
|
||||
syn match resolvError /^search .\{257,}/
|
||||
syn match resolvNull /\s\{1,}$/
|
||||
|
||||
if version >= 508 || !exists("did_config_syntax_inits")
|
||||
if version < 508
|
||||
@@ -66,6 +68,7 @@ if version >= 508 || !exists("did_config_syntax_inits")
|
||||
HiLink resolvIPNetmaskSortList Number
|
||||
|
||||
HiLink resolvNameServer Identifier
|
||||
HiLink resolvLwserver Identifier
|
||||
HiLink resolvDomain Identifier
|
||||
HiLink resolvSearch Identifier
|
||||
HiLink resolvSortList Identifier
|
||||
|
Reference in New Issue
Block a user