1" Vim syntax file 2" This is a GENERATED FILE. Please always refer to source file at the URI below. 3" Language: Apache configuration (httpd.conf, srm.conf, access.conf, .htaccess) 4" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz> 5" License: This file can be redistribued and/or modified under the same terms 6" as Vim itself. 7" Last Change: 2006-12-13 8" URL: http://trific.ath.cx/Ftp/vim/syntax/apache.vim 9" Notes: Last synced with apache-2.2.3, version 1.x is no longer supported 10" TODO: see particular FIXME's scattered through the file 11" make it really linewise? 12" + add `display' where appropriate 13 14" Setup 15if version >= 600 16 if exists("b:current_syntax") 17 finish 18 endif 19else 20 syntax clear 21endif 22 23syn case ignore 24 25" Base constructs 26syn match apacheComment "^\s*#.*$" contains=apacheFixme 27syn match apacheUserID "#-\?\d\+\>" 28syn case match 29syn keyword apacheFixme FIXME TODO XXX NOT 30syn case ignore 31syn match apacheAnything "\s[^>]*" contained 32syn match apacheError "\w\+" contained 33syn region apacheString start=+"+ end=+"+ skip=+\\\\\|\\\"+ 34 35" Core and mpm 36syn keyword apacheDeclaration AccessFileName AddDefaultCharset AllowOverride AuthName AuthType ContentDigest DefaultType DocumentRoot ErrorDocument ErrorLog HostNameLookups IdentityCheck Include KeepAlive KeepAliveTimeout LimitRequestBody LimitRequestFields LimitRequestFieldsize LimitRequestLine LogLevel MaxKeepAliveRequests NameVirtualHost Options Require RLimitCPU RLimitMEM RLimitNPROC Satisfy ScriptInterpreterSource ServerAdmin ServerAlias ServerName ServerPath ServerRoot ServerSignature ServerTokens TimeOut UseCanonicalName 37syn keyword apacheDeclaration AcceptPathInfo CGIMapExtension EnableMMAP FileETag ForceType LimitXMLRequestBody SetHandler SetInputFilter SetOutputFilter 38syn keyword apacheDeclaration AcceptFilter AllowEncodedSlashes EnableSendfile LimitInternalRecursion TraceEnable 39syn keyword apacheOption INode MTime Size 40syn keyword apacheOption Any All On Off Double EMail DNS Min Minimal OS Prod ProductOnly Full 41syn keyword apacheOption emerg alert crit error warn notice info debug 42syn keyword apacheOption registry script inetd standalone 43syn match apacheOptionOption "[+-]\?\<\(ExecCGI\|FollowSymLinks\|Includes\|IncludesNoExec\|Indexes\|MultiViews\|SymLinksIfOwnerMatch\)\>" 44syn keyword apacheOption user group 45syn match apacheOption "\<valid-user\>" 46syn case match 47syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK contained 48syn case ignore 49syn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)[^>]*>" contains=apacheAnything 50syn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)[^>]*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError 51syn keyword apacheLimitSectionKeyword Limit LimitExcept contained 52syn match apacheAuthType "AuthType\s.*$" contains=apacheAuthTypeValue 53syn keyword apacheAuthTypeValue Basic Digest 54syn match apacheAllowOverride "AllowOverride\s.*$" contains=apacheAllowOverrideValue,apacheComment 55syn keyword apacheAllowOverrideValue AuthConfig FileInfo Indexes Limit Options contained 56syn keyword apacheDeclaration CoreDumpDirectory EnableExceptionHook GracefulShutdownTimeout Group Listen ListenBacklog LockFile MaxClients MaxMemFree MaxRequestsPerChild MaxSpareThreads MaxSpareThreadsPerChild MinSpareThreads NumServers PidFile ScoreBoardFile SendBufferSize ServerLimit StartServers StartThreads ThreadLimit ThreadsPerChild User 57syn keyword apacheDeclaration MaxThreads ThreadStackSize 58syn keyword apacheDeclaration Win32DisableAcceptEx 59syn keyword apacheDeclaration AssignUserId ChildPerUserId 60syn keyword apacheDeclaration AcceptMutex MaxSpareServers MinSpareServers 61syn keyword apacheOption flock fcntl sysvsem pthread 62 63" Modules 64syn keyword apacheDeclaration Action Script 65syn keyword apacheDeclaration Alias AliasMatch Redirect RedirectMatch RedirectTemp RedirectPermanent ScriptAlias ScriptAliasMatch 66syn keyword apacheOption permanent temp seeother gone 67syn keyword apacheDeclaration AuthAuthoritative AuthGroupFile AuthUserFile 68syn keyword apacheDeclaration AuthBasicAuthoritative AuthBasicProvider 69syn keyword apacheDeclaration AuthDigestAlgorithm AuthDigestDomain AuthDigestNcCheck AuthDigestNonceFormat AuthDigestNonceLifetime AuthDigestProvider AuthDigestQop AuthDigestShmemSize 70syn keyword apacheOption none auth auth-int MD5 MD5-sess 71syn match apacheSection "<\/\=\(<AuthnProviderAlias\)[^>]*>" contains=apacheAnything 72syn keyword apacheDeclaration Anonymous Anonymous_Authoritative Anonymous_LogEmail Anonymous_MustGiveEmail Anonymous_NoUserID Anonymous_VerifyEmail 73syn keyword apacheDeclaration AuthDBDUserPWQuery AuthDBDUserRealmQuery 74syn keyword apacheDeclaration AuthDBMGroupFile AuthDBMAuthoritative 75syn keyword apacheDeclaration AuthDBM TypeAuthDBMUserFile 76syn keyword apacheOption default SDBM GDBM NDBM DB 77syn keyword apacheDeclaration AuthDefaultAuthoritative 78syn keyword apacheDeclaration AuthUserFile 79syn keyword apacheDeclaration AuthLDAPBindON AuthLDAPEnabled AuthLDAPFrontPageHack AuthLDAPStartTLS 80syn keyword apacheDeclaration AuthLDAPBindDN AuthLDAPBindPassword AuthLDAPCharsetConfig AuthLDAPCompareDNOnServer AuthLDAPDereferenceAliases AuthLDAPGroupAttribute AuthLDAPGroupAttributeIsDN AuthLDAPRemoteUserIsDN AuthLDAPUrl AuthzLDAPAuthoritative 81syn keyword apacheOption always never searching finding 82syn keyword apacheOption ldap-user ldap-group ldap-dn ldap-attribute ldap-filter 83syn keyword apacheDeclaration AuthDBMGroupFile AuthzDBMAuthoritative AuthzDBMType 84syn keyword apacheDeclaration AuthzDefaultAuthoritative 85syn keyword apacheDeclaration AuthGroupFile AuthzGroupFileAuthoritative 86syn match apacheAllowDeny "Allow\s\+from.*$" contains=apacheAllowDenyValue,apacheComment 87syn match apacheAllowDeny "Deny\s\+from.*$" contains=apacheAllowDenyValue,apacheComment 88syn keyword apacheAllowDenyValue All None contained 89syn match apacheOrder "^\s*Order\s.*$" contains=apacheOrderValue,apacheComment 90syn keyword apacheOrderValue Deny Allow contained 91syn keyword apacheDeclaration AuthzOwnerAuthoritative 92syn keyword apacheDeclaration AuthzUserAuthoritative 93syn keyword apacheDeclaration AddAlt AddAltByEncoding AddAltByType AddDescription AddIcon AddIconByEncoding AddIconByType DefaultIcon HeaderName IndexIgnore IndexOptions IndexOrderDefault ReadmeName 94syn keyword apacheDeclaration IndexStyleSheet 95syn keyword apacheOption DescriptionWidth FancyIndexing FoldersFirst IconHeight IconsAreLinks IconWidth NameWidth ScanHTMLTitles SuppressColumnSorting SuppressDescription SuppressHTMLPreamble SuppressLastModified SuppressSize TrackModified 96syn keyword apacheOption Ascending Descending Name Date Size Description 97syn keyword apacheOption HTMLTable SuppressIcon SuppressRules VersionSort XHTML 98syn keyword apacheOption IgnoreClient IgnoreCase ShowForbidden SuppresRules 99syn keyword apacheDeclaration CacheForceCompletion CacheMaxStreamingBuffer 100syn keyword apacheDeclaration CacheDefaultExpire CacheDisable CacheEnable CacheIgnoreCacheControl CacheIgnoreHeaders CacheIgnoreNoLastMod CacheLastModifiedFactor CacheMaxExpire CacheStoreNoStore CacheStorePrivate 101syn keyword apacheDeclaration MetaFiles MetaDir MetaSuffix 102syn keyword apacheDeclaration ScriptLog ScriptLogLength ScriptLogBuffer 103syn keyword apacheDeclaration ScriptStock 104syn keyword apacheDeclaration CharsetDefault CharsetOptions CharsetSourceEnc 105syn keyword apacheOption DebugLevel ImplicitAdd NoImplicitAdd 106syn keyword apacheDeclaration Dav DavDepthInfinity DavMinTimeout 107syn keyword apacheDeclaration DavLockDB 108syn keyword apacheDeclaration DavGenericLockDB 109syn keyword apacheDeclaration DBDExptime DBDKeep DBDMax DBDMin DBDParams DBDPersist DBDPrepareSQL DBDriver 110syn keyword apacheDeclaration DeflateCompressionLevel DeflateBufferSize DeflateFilterNote DeflateMemLevel DeflateWindowSize 111syn keyword apacheDeclaration DirectoryIndex DirectorySlash 112syn keyword apacheDeclaration CacheExpiryCheck CacheGcClean CacheGcDaily CacheGcInterval CacheGcMemUsage CacheGcUnused CacheSize CacheTimeMargin 113syn keyword apacheDeclaration CacheDirLength CacheDirLevels CacheMaxFileSize CacheMinFileSize CacheRoot 114syn keyword apacheDeclaration DumpIOInput DumpIOOutput 115syn keyword apacheDeclaration ProtocolEcho 116syn keyword apacheDeclaration PassEnv SetEnv UnsetEnv 117syn keyword apacheDeclaration Example 118syn keyword apacheDeclaration ExpiresActive ExpiresByType ExpiresDefault 119syn keyword apacheDeclaration ExtFilterDefine ExtFilterOptions 120syn keyword apacheOption PreservesContentLength DebugLevel LogStderr NoLogStderr 121syn match apacheOption "\<\(cmd\|mode\|intype\|outtype\|ftype\|disableenv\|enableenv\)\ze=" 122syn keyword apacheDeclaration CacheFile MMapFile 123syn keyword apacheDeclaration FilterChain FilterDeclare FilterProtocol FilterProvider FilterTrace 124syn keyword apacheDeclaration Header 125syn keyword apacheDeclaration RequestHeader 126syn keyword apacheOption set unset append add 127syn keyword apacheDeclaration IdentityCheck IdentityCheckTimeout 128syn keyword apacheDeclaration ImapMenu ImapDefault ImapBase 129syn keyword apacheOption none formatted semiformatted unformatted 130syn keyword apacheOption nocontent referer error map 131syn keyword apacheDeclaration SSIEndTag SSIErrorMsg SSIStartTag SSITimeFormat SSIUndefinedEcho XBitHack 132syn keyword apacheOption on off full 133syn keyword apacheDeclaration AddModuleInfo 134syn keyword apacheDeclaration ISAPIReadAheadBuffer ISAPILogNotSupported ISAPIAppendLogToErrors ISAPIAppendLogToQuery 135syn keyword apacheDeclaration ISAPICacheFile ISAIPFakeAsync 136syn keyword apacheDeclaration LDAPCertDBPath 137syn keyword apacheDeclaration LDAPCacheEntries LDAPCacheTTL LDAPConnectionTimeout LDAPOpCacheEntries LDAPOpCacheTTL LDAPSharedCacheFile LDAPSharedCacheSize LDAPTrustedClientCert LDAPTrustedGlobalCert LDAPTrustedMode LDAPVerifyServerCert 138syn keyword apacheOption CA_DER CA_BASE64 CA_CERT7_DB CA_SECMOD CERT_DER CERT_BASE64 CERT_KEY3_DB CERT_NICKNAME CERT_PFX KEY_DER KEY_BASE64 KEY_PFX 139syn keyword apacheDeclaration BufferedLogs CookieLog CustomLog LogFormat TransferLog 140syn keyword apacheDeclaration ForensicLog 141syn keyword apacheDeclaration MCacheMaxObjectCount MCacheMaxObjectSize MCacheMaxStreamingBuffer MCacheMinObjectSize MCacheRemovalAlgorithm MCacheSize 142syn keyword apacheDeclaration AddCharset AddEncoding AddHandler AddLanguage AddType DefaultLanguage RemoveEncoding RemoveHandler RemoveType TypesConfig 143syn keyword apacheDeclaration AddInputFilter AddOutputFilter ModMimeUsePathInfo MultiviewsMatch RemoveInputFilter RemoveOutputFilter RemoveCharset 144syn keyword apacheOption NegotiatedOnly Filters Handlers 145syn keyword apacheDeclaration MimeMagicFile 146syn keyword apacheDeclaration MMapFile 147syn keyword apacheDeclaration CacheNegotiatedDocs LanguagePriority ForceLanguagePriority 148syn keyword apacheDeclaration NWSSLTrustedCerts NWSSLUpgradeable SecureListen 149syn keyword apacheDeclaration PerlModule PerlRequire PerlTaintCheck PerlWarn 150syn keyword apacheDeclaration PerlSetVar PerlSetEnv PerlPassEnv PerlSetupEnv 151syn keyword apacheDeclaration PerlInitHandler PerlPostReadRequestHandler PerlHeaderParserHandler 152syn keyword apacheDeclaration PerlTransHandler PerlAccessHandler PerlAuthenHandler PerlAuthzHandler 153syn keyword apacheDeclaration PerlTypeHandler PerlFixupHandler PerlHandler PerlLogHandler 154syn keyword apacheDeclaration PerlCleanupHandler PerlChildInitHandler PerlChildExitHandler 155syn keyword apacheDeclaration PerlRestartHandler PerlDispatchHandler 156syn keyword apacheDeclaration PerlFreshRestart PerlSendHeader 157syn keyword apacheDeclaration php_value php_flag php_admin_value php_admin_flag 158syn match apacheSection "<\/\=\(Proxy\|ProxyMatch\)[^>]*>" contains=apacheAnything 159syn keyword apacheDeclaration AllowCONNECT NoProxy ProxyBadHeader ProxyBlock ProxyDomain ProxyErrorOverride ProxyIOBufferSize ProxyMaxForwards ProxyPass ProxyPassReverse ProxyPassReverseCookieDomain ProxyPassReverseCookiePath ProxyPreserveHost ProxyReceiveBufferSize ProxyRemote ProxyRemoteMatch ProxyRequests ProxyTimeout ProxyVia 160syn keyword apacheDeclaration RewriteBase RewriteCond RewriteEngine RewriteLock RewriteLog RewriteLogLevel RewriteMap RewriteOptions RewriteRule 161syn keyword apacheOption inherit 162syn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase SetEnvIf SetEnvIfNoCase 163syn keyword apacheDeclaration LoadFile LoadModule 164syn keyword apacheDeclaration CheckSpelling CheckCaseOnly 165syn keyword apacheDeclaration SSLCACertificateFile SSLCACertificatePath SSLCADNRequestFile SSLCADNRequestPath SSLCARevocationFile SSLCARevocationPath SSLCertificateChainFile SSLCertificateFile SSLCertificateKeyFile SSLCipherSuite SSLCryptoDevice SSLEngine SSLHonorCipherOrder SSLMutex SSLOptions SSLPassPhraseDialog SSLProtocol SSLProxyCACertificateFile SSLProxyCACertificatePath SSLProxyCARevocationFile SSLProxyCARevocationPath SSLProxyCipherSuite SSLProxyEngine SSLProxyMachineCertificateFile SSLProxyMachineCertificatePath SSLProxyProtocol SSLProxyVerify SSLProxyVerifyDepth SSLRandomSeed SSLRequire SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout SSLUserName SSLVerifyClient SSLVerifyDepth 166syn match apacheOption "[+-]\?\<\(StdEnvVars\|CompatEnvVars\|ExportCertData\|FakeBasicAuth\|StrictRequire\|OptRenegotiate\)\>" 167syn keyword apacheOption builtin sem 168syn match apacheOption "\(file\|exec\|egd\|dbm\|shm\):" 169syn match apacheOption "[+-]\?\<\(SSLv2\|SSLv3\|TLSv1\|kRSA\|kHDr\|kDHd\|kEDH\|aNULL\|aRSA\|aDSS\|aRH\|eNULL\|DES\|3DES\|RC2\|RC4\|IDEA\|MD5\|SHA1\|SHA\|EXP\|EXPORT40\|EXPORT56\|LOW\|MEDIUM\|HIGH\|RSA\|DH\|EDH\|ADH\|DSS\|NULL\)\>" 170syn keyword apacheOption optional optional_no_ca 171syn keyword apacheDeclaration ExtendedStatus 172syn keyword apacheDeclaration SuexecUserGroup 173syn keyword apacheDeclaration UserDir 174syn keyword apacheDeclaration CookieDomain CookieExpires CookieName CookieStyle CookieTracking 175syn keyword apacheOption Netscape Cookie Cookie2 RFC2109 RFC2965 176syn match apacheSection "<\/\=\(<IfVersion\)[^>]*>" contains=apacheAnything 177syn keyword apacheDeclaration VirtualDocumentRoot VirtualDocumentRootIP VirtualScriptAlias VirtualScriptAliasIP 178 179" Define the default highlighting 180if version >= 508 || !exists("did_apache_syntax_inits") 181 if version < 508 182 let did_apache_syntax_inits = 1 183 command -nargs=+ HiLink hi link <args> 184 else 185 command -nargs=+ HiLink hi def link <args> 186 endif 187 188 HiLink apacheAllowOverride apacheDeclaration 189 HiLink apacheAllowOverrideValue apacheOption 190 HiLink apacheAuthType apacheDeclaration 191 HiLink apacheAuthTypeValue apacheOption 192 HiLink apacheOptionOption apacheOption 193 HiLink apacheDeclaration Function 194 HiLink apacheAnything apacheOption 195 HiLink apacheOption Number 196 HiLink apacheComment Comment 197 HiLink apacheFixme Todo 198 HiLink apacheLimitSectionKeyword apacheLimitSection 199 HiLink apacheLimitSection apacheSection 200 HiLink apacheSection Label 201 HiLink apacheMethodOption Type 202 HiLink apacheAllowDeny Include 203 HiLink apacheAllowDenyValue Identifier 204 HiLink apacheOrder Special 205 HiLink apacheOrderValue String 206 HiLink apacheString String 207 HiLink apacheError Error 208 HiLink apacheUserID Number 209 210 delcommand HiLink 211endif 212 213let b:current_syntax = "apache" 214