Start anew
[msysgit.git] / share / vim / vim58 / syntax / apache.vim
blob4b6770f303acf1fbea875e99fe43a655c5cc6f28
1 " Vim syntax file
2 " Language: Apache configuration (httpd.conf, srm.conf, access.conf, .htaccess)
3 " Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
4 " Last Change: 2001-05-13
5 " URI: http://physics.muni.cz/~yeti/download/apache.vim
7 " Notes: Last synced with apache-1.3.14.
8 " TODO: see particular FIXME's scattered through the file
9 "       make it really linewise?
10 "       + add `display' where appropriate
12 " Setup {{{
13 " React to possibly already-defined syntax.
14 " For version 5.x: Clear all syntax items unconditionally
15 " For version 6.x: Quit when a syntax file was already loaded
16 if version >= 600
17   if exists("b:current_syntax")
18     finish
19   endif
20 else
21   syntax clear
22 endif
24 " Set iskeyword since we need really strange chars in keywords.
25 " For version 5.x: Set it globally
26 " For version 6.x: Set it locally
27 if version >= 600
28   setlocal iskeyword=@,48-57,-,+,_
29 else
30   set iskeyword=@,48-57,-,+,_
31 endif
33 syn case ignore
34 " }}}
35 " Base constructs {{{
36 syn match apacheComment "^\s*#.*$" contains=apacheFixme
37 syn case match
38 syn keyword apacheFixme FIXME TODO XXX NOT
39 syn case ignore
40 syn match apacheAnything "\s[^>]*" contained
41 syn match apacheError "\w\+" contained
42 syn region apacheString start=+"+ end=+"+ skip=+\\\\\|\\\"+
43 " }}}
44 " Core {{{
45 syn keyword apacheDeclaration AccessConfig AccessFileName AddDefaultCharset AddModule AuthName AuthType BindAddress BS2000Account ClearModuleList ContentDigest CoreDumpDirectory DefaultType DocumentRoot ErrorDocument ErrorLog Group HostNameLookups IdentityCheck Include KeepAlive KeepAliveTimeout LimitRequestBody LimitRequestFields LimitRequestFieldsize LimitRequestLine Listen ListenBacklog LockFile LogLevel MaxClients MaxKeepAliveRequests MaxRequestsPerChild MaxSpareServers MinSpareServers NameVirtualHost Options PidFile Port require ResourceConfig RLimitCPU RLimitMEM RLimitNPROC Satisfy ScoreBoardFile ScriptInterpreterSource SendBufferSize ServerAdmin ServerAlias ServerName ServerPath ServerRoot ServerSignature ServerTokens ServerType StartServers ThreadsPerChild ThreadStackSize TimeOut UseCanonicalName User
46 syn keyword apacheOption Any All On Off Double EMail DNS Min Minimal OS Prod ProductOnly Full
47 syn keyword apacheOption emerg alert crit error warn notice info debug
48 syn keyword apacheOption registry script inetd standalone
49 syn keyword apacheOptionOption ExecCGI FollowSymLinks Includes IncludesNoExec Indexes MultiViews SymLinksIfOwnerMatch
50 syn keyword apacheOptionOption +ExecCGI +FollowSymLinks +Includes +IncludesNoExec +Indexes +MultiViews +SymLinksIfOwnerMatch
51 syn keyword apacheOptionOption -ExecCGI -FollowSymLinks -Includes -IncludesNoExec -Indexes -MultiViews -SymLinksIfOwnerMatch
52 syn keyword apacheOption user group valid-user
53 syn case match
54 syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK contained
55 syn case ignore
56 syn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)\+.*>" contains=apacheAnything
57 syn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)\+.*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError
58 syn keyword apacheLimitSectionKeyword Limit LimitExcept contained
59 syn match apacheAuthType "AuthType\s.*$" contains=apacheAuthTypeValue
60 syn keyword apacheAuthTypeValue Basic Digest
61 syn match apacheAllowOverride "AllowOverride\s.*$" contains=apacheAllowOverrideValue,apacheComment
62 syn keyword apacheAllowOverrideValue AuthConfig FileInfo Indexes Limit Options contained
63 " }}}
64 " Modules {{{
65 " mod_access
66 syn match apacheAllowDeny "Allow\s\+from.*$" contains=apacheAllowDenyValue,apacheComment
67 syn match apacheAllowDeny "Deny\s\+from.*$" contains=apacheAllowDenyValue,apacheComment
68 syn keyword apacheAllowDenyValue All None contained
69 syn match apacheOrder "^\s*Order\s.*$" contains=apacheOrderValue,apacheComment
70 syn keyword apacheOrderValue Deny Allow contained
71 " mod_actions
72 syn keyword apacheDeclaration Action Script
73 " mod_alias
74 syn keyword apacheDeclaration Alias AliasMatch Redirect RedirectMatch RedirectTemp RedirectPermanent ScriptAlias ScriptAliasMatch
75 syn keyword apacheOption permanent temp seeother gone
76 " mod_asis (no own directives)
77 " mod_auth
78 syn keyword apacheDeclaration AuthGroupFile AuthUserFile AuthAuthoritative
79 " mod_auth_anon
80 syn keyword apacheDeclaration Anonymous Anonymous_Authoritative Anonymous_LogEmail Anonymous_MustGiveEmail Anonymous_NoUserID Anonymous_VerifyEmail
81 " mod_auth_db
82 syn keyword apacheDeclaration AuthDBGroupFile AuthDBUserFile AuthDBAuthoritative
83 " mod_auth_dbm
84 syn keyword apacheDeclaration AuthDBMGroupFile AuthDBMUserFile AuthDBMAuthoritative
85 " mod_auth_digest
86 syn keyword apacheDeclaration AuthDigestFile AuthDigestGroupFile AuthDigestQop AuthDigestNonceLifetime AuthDigestNonceFormat AuthDigestNcCheck AuthDigestAlgorithm AuthDigestDomain
87 syn keyword apacheOption none auth auth-int MD5 MD5-sess
88 " mod_autoindex
89 syn keyword apacheDeclaration AddAlt AddAltByEncoding AddAltByType AddDescription AddIcon AddIconByEncoding AddIconByType DefaultIcon FancyIndexing HeaderName IndexIgnore IndexOptions IndexOrderDefault ReadmeName
90 syn keyword apacheOption DescriptionWidth FancyIndexing FoldersFirst IconHeight IconsAreLinks IconWidth NameWidth ScanHTMLTitles SuppressColumnSorting SuppressDescription SuppressHTMLPreamble SuppressLastModified SuppressSize
91 syn keyword apacheOption Ascending Descending Name Date Size Description
92 " mod_browser
93 syn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase
94 " mod_cern_meta
95 syn keyword apacheDeclaration MetaFiles MetaDir MetaSuffix
96 " mod_cgi
97 syn keyword apacheDeclaration ScriptLog ScriptLogLength ScriptLogBuffer
98 " mod_dav
99 " FXIME: not implemented---don't know anything about this module
100 " mod_define
101 " FXIME: we don't highlight user defined variables at all
102 syn keyword apacheDeclaration Define
103 " mod_digest
104 syn keyword apacheDeclaration AuthDigestFile
105 " mod_dir
106 syn keyword apacheDeclaration DirectoryIndex
107 " mod_env
108 syn keyword apacheDeclaration PassEnv SetEnv UnsetEnv
109 " mod_example
110 syn keyword apacheDeclaration Example
111 " mod_expires
112 syn keyword apacheDeclaration ExpiresActive ExpiresByType ExpiresDefault
113 " mod_headers
114 syn keyword apacheDeclaration Header
115 syn keyword apacheOption set unset append add
116 " mod_imap
117 syn keyword apacheDeclaration ImapMenu ImapDefault ImapBase
118 syn keyword apacheOption none formatted semiformatted unformatted
119 syn keyword apacheOption nocontent
120 " mod_include
121 syn keyword apacheDeclaration XBitHack
122 syn keyword apacheOption on off full
123 " mod_info
124 syn keyword apacheDeclaration AddModuleInfo
125 " mod_isapi
126 syn keyword apacheDeclaration ISAPIReadAheadBuffer ISAPILogNotSupported ISAPIAppendLogToErrors ISAPIAppendLogToQuery
127 " mod_log_agent
128 syn keyword apacheDeclaration AgentLog
129 " mod_log_config
130 syn keyword apacheDeclaration CookieLog CustomLog LogFormat TransferLog
131 " mod_log_referer
132 syn keyword apacheDeclaration RefererIgnore RefererLog
133 " mod_mime
134 syn keyword apacheDeclaration AddCharset AddEncoding AddHandler AddLanguage AddType DefaultLanguage ForceType RemoveEncoding RemoveHandler RemoveType SetHandler TypesConfig
135 " mod_mime_magic
136 syn keyword apacheDeclaration MimeMagicFile
137 " mod_mmap_static
138 syn keyword apacheDeclaration MMapFile
139 " mod_negotiation
140 syn keyword apacheDeclaration CacheNegotiatedDocs LanguagePriority
141 " mod_perl
142 " FXIME: not implemented---for proper highligting the whole Perl thing has to
143 " be embeded making vim incredibily s...l...o...w...
144 " mod_proxy
145 syn keyword apacheDeclaration ProxyRequests ProxyRemote ProxyPass ProxyPassReverse ProxyBlock AllowCONNECT ProxyReceiveBufferSize NoProxy ProxyDomain ProxyVia CacheRoot CacheSize CacheMaxExpire CacheDefaultExpire CacheLastModifiedFactor CacheGcInterval CacheDirLevels CacheDirLength CacheForceCompletion NoCache
146 syn keyword apacheOption block
147 " mod_put
148 " FXIME: not implemented---need some doc
149 " mod_rewrite
150 " FIXME: rewriting rules are not highlighted because I don't understand them...
151 syn keyword apacheDeclaration RewriteEngine RewriteOptions RewriteLog RewriteLogLevel RewriteLock RewriteMap RewriteBase RewriteCond RewriteRule
152 syn keyword apacheOption inherit
153 " mod_roaming
154 syn keyword apacheDeclaration RoamingAlias
155 " mod_setenvif
156 syn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase SetEnvIf SetEnvIfNoCase
157 " mod_so
158 syn keyword apacheDeclaration LoadFile LoadModule
159 " mod_speling
160 syn keyword apacheDeclaration CheckSpelling
161 " mod_ssl
162 " FIXME: SSLCipherSuite parameters are not properly highlighted
163 " FIXME: SSLRequire rules are not highlighted
164 syn keyword apacheDeclaration SSLPassPhraseDialog SSLMutex SSLRandomSeed SSLSessionCache SSLSessionCacheTimeout SSLEngine SSLProtocol SSLCipherSuite SSLCertificateFile SSLCertificateKeyFile SSLCertificateChainFile SSLCACertificatePath SSLCACertificateFile SSLCARevocationPath SSLCARevocationFile SSLVerifyClient SSLVerifyDepth SSLLog SSLLogLevel SSLOptions SSLRequireSSL SSLRequire
165 syn keyword apacheOption StdEnvVars CompatEnvVars ExportCertData FakeBasicAuth StrictRequire OptRenegotiate
166 syn keyword apacheOption +StdEnvVars +CompatEnvVars +ExportCertData +FakeBasicAuth +StrictRequire +OptRenegotiate
167 syn keyword apacheOption -StdEnvVars -CompatEnvVars -ExportCertData -FakeBasicAuth -StrictRequire -OptRenegotiate
168 syn keyword apacheOption builtin sem
169 syn match apacheOption "\(file\|exec\|egd\|dbm\|shm\):"
170 syn keyword apacheOption SSLv2 SSLv3 TLSv1 -SSLv2 -SSLv3 -TLSv1 +SSLv2 +SSLv3 +TLSv1
171 syn keyword apacheOption optional require optional_no_ca
172 " mod_status
173 syn keyword apacheDeclaration ExtendedStatus
174 " mod_userdir
175 syn keyword apacheDeclaration UserDir
176 " mod_usertrack
177 syn keyword apacheDeclaration CookieExpires CookieName CookieTracking
178 " mod_vhost_alias
179 syn keyword apacheDeclaration VirtualDocumentRoot VirtualDocumentRootIP VirtualScriptAlias VirtualScriptAliasIP
180 " }}}
181 " Define the default highlighting {{{
182 " For version 5.7 and earlier: Only when not done already
183 " For version 5.8 and later: Only when an item doesn't have highlighting yet
184 if version >= 508 || !exists("did_apache_syntax_inits")
185   if version < 508
186     let did_apache_syntax_inits = 1
187     command -nargs=+ HiLink hi link <args>
188   else
189     command -nargs=+ HiLink hi def link <args>
190   endif
192   HiLink apacheAllowOverride       apacheDeclaration
193   HiLink apacheAllowOverrideValue  apacheOption
194   HiLink apacheAuthType            apacheDeclaration
195   HiLink apacheAuthTypeValue       apacheOption
196   HiLink apacheOptionOption        apacheOption
197   HiLink apacheDeclaration         Function
198   HiLink apacheAnything            apacheOption
199   HiLink apacheOption              Number
200   HiLink apacheComment             Comment
201   HiLink apacheFixme               Todo
202   HiLink apacheLimitSectionKeyword apacheLimitSection
203   HiLink apacheLimitSection        apacheSection
204   HiLink apacheSection             Label
205   HiLink apacheMethodOption        Type
206   HiLink apacheAllowDeny           Include
207   HiLink apacheAllowDenyValue      Identifier
208   HiLink apacheOrder               Special
209   HiLink apacheOrderValue          String
210   HiLink apacheString              Number
211   HiLink apacheError               Error
213   delcommand HiLink
214 endif
215 " }}}
216 let b:current_syntax = "apache"