Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165" Vim syntax file" Language: HAproxy" Maintainer: Bruno Michel <brmichel@free.fr>" Last Change: Mar 30, 2007" Version: 0.3" URL: http://haproxy.1wt.eu/" URL: http://vim.sourceforge.net/scripts/script.php?script_id=1845
" It is suggested to add the following line to $HOME/.vimrc :" au BufRead,BufNewFile haproxy* set ft=haproxy
" For version 5.x: Clear all syntax items" For version 6.x: Quit when a syntax file was already loadedif version < 600 syntax clearelseif exists("b:current_syntax") finishendif
if version >= 600 setlocal iskeyword=_,-,a-z,A-Z,48-57else set iskeyword=_,-,a-z,A-Z,48-57endif
" Escaped charssyn match hapEscape +\\\(\\\| \|n\|r\|t\|#\|x\x\x\)+
" Commentssyn match hapComment /#.*$/ contains=hapTodosyn keyword hapTodo contained TODO FIXME XXXsyn case ignore
" Sectionssyn match hapSection /^\s*\(global\|defaults\)/syn match hapSection /^\s*\(listen\|frontend\|backend\|ruleset\)/ skipwhite nextgroup=hapSectLabelsyn match hapSectLabel /\S\+/ skipwhite nextgroup=hapIp1 containedsyn match hapIp1 /\(\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)\?:\d\{1,5}/ nextgroup=hapIp2 containedsyn match hapIp2 /,\(\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\)\?:\d\{1,5}/hs=s+1 nextgroup=hapIp2 contained
" Parameterssyn keyword hapParam chroot cliexp clitimeout contimeoutsyn keyword hapParam daemon debug disabledsyn keyword hapParam enabledsyn keyword hapParam fullconnsyn keyword hapParam gid grace groupsyn keyword hapParam maxconn monitor-urisyn keyword hapParam nbproc noepoll nopollsyn keyword hapParam pidfilesyn keyword hapParam quietsyn keyword hapParam redispatch retriessyn keyword hapParam reqallow reqdel reqdeny reqpass reqtarpit skipwhite nextgroup=hapRegexpsyn keyword hapParam reqiallow reqidel reqideny reqipass reqitarpit skipwhite nextgroup=hapRegexpsyn keyword hapParam rspdel rspdeny skipwhite nextgroup=hapRegexpsyn keyword hapParam rspidel rspideny skipwhite nextgroup=hapRegexpsyn keyword hapParam reqsetbe reqisetbe skipwhite nextgroup=hapRegexp2syn keyword hapParam reqadd reqiadd rspadd rspiaddsyn keyword hapParam server source srvexp srvtimeoutsyn keyword hapParam uid ulimit-n usersyn keyword hapParam reqrep reqirep rsprep rspirep skipwhite nextgroup=hapRegexpsyn keyword hapParam errorloc errorloc302 errorloc303 skipwhite nextgroup=hapStatussyn keyword hapParam default_backend skipwhite nextgroup=hapSectLabelsyn keyword hapParam appsession skipwhite nextgroup=hapAppSesssyn keyword hapParam bind skipwhite nextgroup=hapIp1syn keyword hapParam balance skipwhite nextgroup=hapBalancesyn keyword hapParam cookie skipwhite nextgroup=hapCookieNamsyn keyword hapParam capture skipwhite nextgroup=hapCapturesyn keyword hapParam dispatch skipwhite nextgroup=hapIpPortsyn keyword hapParam source skipwhite nextgroup=hapIpPortsyn keyword hapParam mode skipwhite nextgroup=hapModesyn keyword hapParam monitor-net skipwhite nextgroup=hapIPv4Masksyn keyword hapParam option skipwhite nextgroup=hapOptionsyn keyword hapParam stats skipwhite nextgroup=hapStatssyn keyword hapParam server skipwhite nextgroup=hapServerNsyn keyword hapParam source skipwhite nextgroup=hapServerEOLsyn keyword hapParam log skipwhite nextgroup=hapGLog,hapLogIp
" Options and additional parameterssyn keyword hapAppSess contained len timeoutsyn keyword hapBalance contained roundrobin sourcesyn keyword hapLen contained lensyn keyword hapGLog contained globalsyn keyword hapMode contained http tcp healthsyn keyword hapOption contained abortonclose allbackups checkcache clitcpka dontlognull forceclose forwardforsyn keyword hapOption contained httpchk httpclose httplog keepalive logasap persist srvtcpka ssl-hello-chksyn keyword hapOption contained tcplog tcpka tcpsplicesyn keyword hapOption contained except skipwhite nextgroup=hapIPv4Masksyn keyword hapStats contained uri realm auth scope enablesyn keyword hapLogFac contained kern user mail daemon auth syslog lpr news nextgroup=hapLogLvl skipwhitesyn keyword hapLogFac contained uucp cron auth2 ftp ntp audit alert cron2 nextgroup=hapLogLvl skipwhitesyn keyword hapLogFac contained local0 local1 local2 local3 local4 local5 local6 local7 nextgroup=hapLogLvl skipwhitesyn keyword hapLogLvl contained emerg alert crit err warning notice info debugsyn keyword hapCookieKey contained rewrite insert nocache postonly indirect prefix nextgroup=hapCookieKey skipwhitesyn keyword hapCapture contained cookie nextgroup=hapNameLen skipwhitesyn keyword hapCapture contained request response nextgroup=hapHeader skipwhitesyn keyword hapHeader contained header nextgroup=hapNameLen skipwhitesyn keyword hapSrvKey contained backup cookie check inter rise fall port source minconn maxconn weight usesrcsyn match hapStatus contained /\d\{3}/syn match hapIPv4Mask contained /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\(\/\d\{1,2}\)\?/syn match hapLogIp contained /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}/ nextgroup=hapLogFac skipwhitesyn match hapIpPort contained /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}:\d\{1,5}/syn match hapServerAd contained /\d\{1,3}\.\d\{1,3}\.\d\{1,3}\.\d\{1,3}\(:[+-]\?\d\{1,5}\)\?/ nextgroup=hapSrvEOL skipwhitesyn match hapNameLen contained /\S\+/ nextgroup=hapLen skipwhitesyn match hapCookieNam contained /\S\+/ nextgroup=hapCookieKey skipwhitesyn match hapServerN contained /\S\+/ nextgroup=hapServerAd skipwhitesyn region hapSrvEOL contained start=/\S/ end=/$/ contains=hapSrvKeysyn region hapRegexp contained start=/\S/ end=/\(\s\|$\)/ skip=/\\ / nextgroup=hapRegRepl skipwhitesyn region hapRegRepl contained start=/\S/ end=/$/ contains=hapComment,hapEscape,hapBackRefsyn region hapRegexp2 contained start=/\S/ end=/\(\s\|$\)/ skip=/\\ / nextgroup=hapSectLabel skipwhitesyn match hapBackref contained /\\\d/
" Transparent is a Vim keyword, so we need a regexp to match itsyn match hapParam +transparent+syn match hapOption +transparent+ contained
" Define the default highlighting." For version 5.7 and earlier: only when not done already" For version 5.8 and later: only when an item doesn't have highlighting yetif version < 508 command -nargs=+ HiLink hi link <args>else command -nargs=+ HiLink hi def link <args>endif
HiLink hapEscape SpecialCharHiLink hapBackRef SpecialHiLink hapComment CommentHiLink hapTodo TodoHiLink hapSection ConstantHiLink hapSectLabel IdentifierHiLink hapParam Keyword
HiLink hapRegexp StringHiLink hapRegexp2 hapRegexpHiLink hapIp1 NumberHiLink hapIp2 hapIp1HiLink hapLogIp hapIp1HiLink hapIpPort hapIp1HiLink hapIPv4Mask hapIp1HiLink hapServerAd hapIp1HiLink hapStatus Number
HiLink hapOption OperatorHiLink hapAppSess hapOptionHiLink hapBalance hapOptionHiLink hapCapture hapOptionHiLink hapCookieKey hapOptionHiLink hapHeader hapOptionHiLink hapGLog hapOptionHiLink hapLogFac hapOptionHiLink hapLogLvl hapOptionHiLink hapMode hapOptionHiLink hapStats hapOptionHiLink hapLen hapOptionHiLink hapSrvKey hapOption
delcommand HiLink
let b:current_syntax = "haproxy"" vim: ts=8