home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / unix / vim-6.2.tar.bz2 / vim-6.2.tar / vim62 / runtime / syntax / apache.vim < prev    next >
Encoding:
Text File  |  2002-10-15  |  14.4 KB  |  276 lines

  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. " Last Change: 2002-10-15
  6. " URL: http://trific.ath.cx/Ftp/vim/syntax/apache.vim
  7. " Note: define apache_version to your Apache version, e.g. "1.3", "2", "2.0.39"
  8.  
  9. " Setup
  10. if version >= 600
  11.     if exists("b:current_syntax")
  12.         finish
  13.     endif
  14. else
  15.     syntax clear
  16. endif
  17.  
  18. if exists("apache_version")
  19.     let s:av = apache_version
  20. else
  21.     let s:av = "1.3"
  22. endif
  23. let s:av = substitute(s:av, "[^.0-9]", "", "g")
  24. let s:av = substitute(s:av, "^\\d\\+$", "\\0.999", "")
  25. let s:av = substitute(s:av, "^\\d\\+\\.\\d\\+$", "\\0.999", "")
  26. let s:av = substitute(s:av, "\\<\\d\\>", "0\\0", "g")
  27. let s:av = substitute(s:av, "\\<\\d\\d\\>", "0\\0", "g")
  28. let s:av = substitute(s:av, "[.]", "", "g")
  29.  
  30. syn case ignore
  31.  
  32. " Base constructs
  33. syn match apacheComment "^\s*#.*$" contains=apacheFixme
  34. if s:av >= "002000000"
  35.     syn match apacheUserID "#-\?\d\+\>"
  36. endif
  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 and mpm
  45. syn 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
  46. if s:av < "002000000"
  47.     syn keyword apacheDeclaration AccessConfig AddModule BindAddress BS2000Account ClearModuleList CoreDumpDirectory Group Listen ListenBacklog LockFile MaxClients MaxRequestsPerChild MaxSpareServers MinSpareServers PidFile Port ResourceConfig ScoreBoardFile SendBufferSize ServerType StartServers ThreadsPerChild ThreadStackSize User
  48. endif
  49. if s:av >= "002000000"
  50.     syn keyword apacheDeclaration AcceptPathInfo CGIMapExtension EnableMMAP FileETag ForceType LimitXMLRequestBody SetHandler SetInputFilter SetOutputFilter
  51.     syn keyword apacheOption INode MTime Size
  52. endif
  53. syn keyword apacheOption Any All On Off Double EMail DNS Min Minimal OS Prod ProductOnly Full
  54. syn keyword apacheOption emerg alert crit error warn notice info debug
  55. syn keyword apacheOption registry script inetd standalone
  56. syn match apacheOptionOption "[+-]\?\<\(ExecCGI\|FollowSymLinks\|Includes\|IncludesNoExec\|Indexes\|MultiViews\|SymLinksIfOwnerMatch\)\>"
  57. syn keyword apacheOption user group valid-user
  58. syn case match
  59. syn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK contained
  60. syn case ignore
  61. syn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)\+.*>" contains=apacheAnything
  62. syn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)\+.*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheError
  63. syn keyword apacheLimitSectionKeyword Limit LimitExcept contained
  64. syn match apacheAuthType "AuthType\s.*$" contains=apacheAuthTypeValue
  65. syn keyword apacheAuthTypeValue Basic Digest
  66. syn match apacheAllowOverride "AllowOverride\s.*$" contains=apacheAllowOverrideValue,apacheComment
  67. syn keyword apacheAllowOverrideValue AuthConfig FileInfo Indexes Limit Options contained
  68. if s:av >= "002000000"
  69.     syn keyword apacheDeclaration CoreDumpDirectory Group Listen ListenBacklog LockFile MaxClients MaxMemFree MaxRequestsPerChild MaxSpareThreads MaxSpareThreadsPerChild MinSpareThreads NumServers PidFile ScoreBoardFile SendBufferSize ServerLimit StartServers StartThreads ThreadLimit ThreadsPerChild User
  70.     syn keyword apacheDeclaration MaxThreads ThreadStackSize
  71.     syn keyword apacheDeclaration AssignUserId ChildPerUserId
  72.     syn keyword apacheDeclaration AcceptMutex MaxSpareServers MinSpareServers
  73.     syn keyword apacheOption flock fcntl sysvsem pthread
  74. endif
  75.  
  76. " Modules
  77. syn match apacheAllowDeny "Allow\s\+from.*$" contains=apacheAllowDenyValue,apacheComment
  78. syn match apacheAllowDeny "Deny\s\+from.*$" contains=apacheAllowDenyValue,apacheComment
  79. syn keyword apacheAllowDenyValue All None contained
  80. syn match apacheOrder "^\s*Order\s.*$" contains=apacheOrderValue,apacheComment
  81. syn keyword apacheOrderValue Deny Allow contained
  82. syn keyword apacheDeclaration Action Script
  83. syn keyword apacheDeclaration Alias AliasMatch Redirect RedirectMatch RedirectTemp RedirectPermanent ScriptAlias ScriptAliasMatch
  84. syn keyword apacheOption permanent temp seeother gone
  85. syn keyword apacheDeclaration AuthAuthoritative AuthGroupFile AuthUserFile
  86. syn keyword apacheDeclaration Anonymous Anonymous_Authoritative Anonymous_LogEmail Anonymous_MustGiveEmail Anonymous_NoUserID Anonymous_VerifyEmail
  87. if s:av < "002000000"
  88.     syn keyword apacheDeclaration AuthDBGroupFile AuthDBUserFile AuthDBAuthoritative
  89. endif
  90. syn keyword apacheDeclaration AuthDBMGroupFile AuthDBMUserFile AuthDBMAuthoritative
  91. if s:av >= "002000000"
  92.     syn keyword apacheDeclaration AuthDBMType
  93.     syn keyword apacheOption default SDBM GDBM NDBM DB
  94. endif
  95. syn keyword apacheDeclaration AuthDigestAlgorithm AuthDigestDomain AuthDigestFile AuthDigestGroupFile AuthDigestNcCheck AuthDigestNonceFormat AuthDigestNonceLifetime AuthDigestQop
  96. syn keyword apacheOption none auth auth-int MD5 MD5-sess
  97. if s:av >= "002000000"
  98.     syn keyword apacheDeclaration AuthLDAPAuthoritative AuthLDAPBindON AuthLDAPBindPassword AuthLDAPCompareDNOnServer AuthLDAPDereferenceAliases AuthLDAPEnabled AuthLDAPFrontPageHack AuthLDAPGroupAttribute AuthLDAPGroupAttributeIsDN AuthLDAPRemoteUserIsDN AuthLDAPStartTLS AuthLDAPUrl
  99.     syn keyword apacheOption always never searching finding
  100. endif
  101. if s:av < "002000000"
  102.     syn keyword apacheDeclaration FancyIndexing
  103. endif
  104. syn keyword apacheDeclaration AddAlt AddAltByEncoding AddAltByType AddDescription AddIcon AddIconByEncoding AddIconByType DefaultIcon HeaderName IndexIgnore IndexOptions IndexOrderDefault ReadmeName
  105. syn keyword apacheOption DescriptionWidth FancyIndexing FoldersFirst IconHeight IconsAreLinks IconWidth NameWidth ScanHTMLTitles SuppressColumnSorting SuppressDescription SuppressHTMLPreamble SuppressLastModified SuppressSize TrackModified
  106. syn keyword apacheOption Ascending Descending Name Date Size Description
  107. if s:av >= "002000000"
  108.     syn keyword apacheOption HTMLTable SupressIcon SupressRules VersionSort
  109. endif
  110. if s:av < "002000000"
  111.     syn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase
  112. endif
  113. if s:av >= "002000000"
  114.     syn keyword apacheDeclaration CacheDefaultExpire CacheEnable CacheForceCompletion CacheIgnoreCacheControl CacheIgnoreNoLastMod CacheLastModifiedFactor CacheMaxExpire CacheMaxStreamingBuffer
  115. endif
  116. syn keyword apacheDeclaration MetaFiles MetaDir MetaSuffix
  117. syn keyword apacheDeclaration ScriptLog ScriptLogLength ScriptLogBuffer
  118. if s:av >= "002000000"
  119.     syn keyword apacheDeclaration ScriptStock
  120.     syn keyword apacheDeclaration CharsetDefault CharsetOptions CharsetSourceEnc
  121.     syn keyword apacheOption DebugLevel ImplicitAdd NoImplicitAdd
  122. endif
  123. syn keyword apacheDeclaration Dav DavDepthInfinity DavLockDB DavMinTimeout
  124. if s:av < "002000000"
  125.     syn keyword apacheDeclaration Define
  126. end
  127. if s:av >= "002000000"
  128.     syn keyword apacheDeclaration DeflateBufferSize DeflateFilterNote DeflateMemLevel DeflateWindowSize
  129. endif
  130. if s:av < "002000000"
  131.     syn keyword apacheDeclaration AuthDigestFile
  132. endif
  133. syn keyword apacheDeclaration DirectoryIndex
  134. if s:av >= "002000000"
  135.     syn keyword apacheDeclaration ProtocolEcho
  136. endif
  137. syn keyword apacheDeclaration PassEnv SetEnv UnsetEnv
  138. syn keyword apacheDeclaration Example
  139. syn keyword apacheDeclaration ExpiresActive ExpiresByType ExpiresDefault
  140. if s:av >= "002000000"
  141.     syn keyword apacheDeclaration ExtFilterDefine ExtFilterOptions
  142.     syn keyword apacheOption PreservesContentLength DebugLevel LogStderr NoLogStderr
  143.     syn keyword apacheDeclaration CacheFile MMapFile
  144. endif
  145. syn keyword apacheDeclaration Header
  146. if s:av >= "002000000"
  147.     syn keyword apacheDeclaration RequestHeader
  148. endif
  149. syn keyword apacheOption set unset append add
  150. syn keyword apacheDeclaration ImapMenu ImapDefault ImapBase
  151. syn keyword apacheOption none formatted semiformatted unformatted
  152. syn keyword apacheOption nocontent referer error map
  153. syn keyword apacheDeclaration XBitHack
  154. if s:av >= "002000000"
  155.     syn keyword apacheDeclaration SSIEndTag SSIErrorMsg SSIStartTag SSITimeFormat SSIUndefinedEcho
  156. endif
  157. syn keyword apacheOption on off full
  158. syn keyword apacheDeclaration AddModuleInfo
  159. syn keyword apacheDeclaration ISAPIReadAheadBuffer ISAPILogNotSupported ISAPIAppendLogToErrors ISAPIAppendLogToQuery
  160. if s:av >= "002000000"
  161.     syn keyword apacheDeclaration ISAPICacheFile ISAIPFakeAsync
  162.     syn keyword apacheDeclaration LDAPCacheEntries LDAPCacheTTL LDAPCertDBPath LDAPOpCacheEntries LDAPOpCacheTTL LDAPSharedCacheSize
  163. endif
  164. if s:av < "002000000"
  165.     syn keyword apacheDeclaration AgentLog
  166. endif
  167. syn keyword apacheDeclaration CookieLog CustomLog LogFormat TransferLog
  168. if s:av < "002000000"
  169.     syn keyword apacheDeclaration RefererIgnore RefererLog
  170. endif
  171. if s:av >= "002000000"
  172. endif
  173. syn keyword apacheDeclaration AddCharset AddEncoding AddHandler AddLanguage AddType DefaultLanguage RemoveEncoding RemoveHandler RemoveType TypesConfig
  174. if s:av < "002000000"
  175.     syn keyword apacheDeclaration ForceType SetHandler
  176. endif
  177. if s:av >= "002000000"
  178.     syn keyword apacheDeclaration AddInputFilter AddOutputFilter ModMimeUsePathInfo MultiviewsMatch RemoveInputFilter RemoveOutputFilter
  179. endif
  180. syn keyword apacheDeclaration MimeMagicFile
  181. syn keyword apacheDeclaration MMapFile
  182. syn keyword apacheDeclaration CacheNegotiatedDocs LanguagePriority
  183. if s:av >= "002000000"
  184.     syn keyword apacheDeclaration ForceLanguagePriority
  185. endif
  186. syn keyword apacheDeclaration PerlModule PerlRequire PerlTaintCheck PerlWarn
  187. syn keyword apacheDeclaration PerlSetVar PerlSetEnv PerlPassEnv PerlSetupEnv
  188. syn keyword apacheDeclaration PerlInitHandler PerlPostReadRequestHandler PerlHeaderParserHandler
  189. syn keyword apacheDeclaration PerlTransHandler PerlAccessHandler PerlAuthenHandler PerlAuthzHandler
  190. syn keyword apacheDeclaration PerlTypeHandler PerlFixupHandler PerlHandler PerlLogHandler
  191. syn keyword apacheDeclaration PerlCleanupHandler PerlChildInitHandler PerlChildExitHandler
  192. syn keyword apacheDeclaration PerlRestartHandler PerlDispatchHandler
  193. syn keyword apacheDeclaration PerlFreshRestart PerlSendHeader
  194. syn keyword apacheDeclaration php_value php_flag php_admin_value php_admin_flag
  195. syn keyword apacheDeclaration AllowCONNECT NoProxy ProxyBlock ProxyDomain ProxyPass ProxyPassReverse ProxyReceiveBufferSize ProxyRemote ProxyRequests ProxyVia
  196. if s:av < "002000000"
  197.     syn keyword apacheDeclaration CacheRoot CacheSize CacheMaxExpire CacheDefaultExpire CacheLastModifiedFactor CacheGcInterval CacheDirLevels CacheDirLength CacheForceCompletion NoCache
  198.     syn keyword apacheOption block
  199. endif
  200. if s:av >= "002000000"
  201.     syn match apacheSection "<\/\=\(Proxy\|ProxyMatch\)\+.*>" contains=apacheAnything
  202.     syn keyword apacheDeclaration ProxyErrorOverride ProxyIOBufferSize ProxyMaxForwards ProxyPreserveHost ProxyRemoteMatch ProxyTimeout
  203. endif
  204. syn keyword apacheDeclaration RewriteEngine RewriteOptions RewriteLog RewriteLogLevel RewriteLock RewriteMap RewriteBase RewriteCond RewriteRule
  205. syn keyword apacheOption inherit
  206. if s:av < "002000000"
  207.     syn keyword apacheDeclaration RoamingAlias
  208. endif
  209. syn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase SetEnvIf SetEnvIfNoCase
  210. syn keyword apacheDeclaration LoadFile LoadModule
  211. syn keyword apacheDeclaration CheckSpelling
  212. syn keyword apacheDeclaration SSLCACertificateFile SSLCACertificatePath SSLCARevocationFile SSLCARevocationPath SSLCertificateChainFile SSLCertificateFile SSLCertificateKeyFile SSLCipherSuite SSLEngine SSLMutex SSLOptions SSLPassPhraseDialog SSLProtocol SSLRandomSeed SSLRequire SSLRequireSSL SSLSessionCache SSLSessionCacheTimeout SSLVerifyClient SSLVerifyDepth
  213. if s:av < "002000000"
  214.     syn keyword apacheDeclaration SSLLog SSLLogLevel
  215. endif
  216. if s:av >= "002000000"
  217.     syn keyword apacheDeclaration SSLProxyCACertificateFile SSLProxyCACertificatePath SSLProxyCARevocationFile SSLProxyCARevocationPath SSLProxyCipherSuite SSLProxyEngine SSLProxyMachineCertificateFile SSLProxyMachineCertificatePath SSLProxyProtocol SSLProxyVerify SSLProxyVerifyDepth
  218. endif
  219. syn match apacheOption "[+-]\?\<\(StdEnvVars\|CompatEnvVars\|ExportCertData\|FakeBasicAuth\|StrictRequire\|OptRenegotiate\)\>"
  220. syn keyword apacheOption builtin sem
  221. syn match apacheOption "\(file\|exec\|egd\|dbm\|shm\):"
  222. if s:av < "002000000"
  223.     syn match apacheOption "[+-]\?\<\(SSLv2\|SSLv3\|TLSv1\)\>"
  224. endif
  225. if s:av >= "002000000"
  226.     syn 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\)\>"
  227. endif
  228. syn keyword apacheOption optional require optional_no_ca
  229. syn keyword apacheDeclaration ExtendedStatus
  230. if s:av >= "002000000"
  231.     syn keyword apacheDeclaration SuexecUserGroup
  232. endif
  233. syn keyword apacheDeclaration UserDir
  234. syn keyword apacheDeclaration CookieExpires CookieName CookieTracking
  235. if s:av >= "002000000"
  236.     syn keyword apacheDeclaration CookieDomain CookieStyle
  237.     syn keyword apacheOption Netscape Cookie Cookie2 RFC2109 RFC2965
  238. endif
  239. syn keyword apacheDeclaration VirtualDocumentRoot VirtualDocumentRootIP VirtualScriptAlias VirtualScriptAliasIP
  240.  
  241. " Define the default highlighting
  242. if version >= 508 || !exists("did_apache_syntax_inits")
  243.     if version < 508
  244.         let did_apache_syntax_inits = 1
  245.         command -nargs=+ HiLink hi link <args>
  246.     else
  247.         command -nargs=+ HiLink hi def link <args>
  248.     endif
  249.  
  250.     HiLink apacheAllowOverride apacheDeclaration
  251.     HiLink apacheAllowOverrideValue apacheOption
  252.     HiLink apacheAuthType apacheDeclaration
  253.     HiLink apacheAuthTypeValue apacheOption
  254.     HiLink apacheOptionOption apacheOption
  255.     HiLink apacheDeclaration Function
  256.     HiLink apacheAnything apacheOption
  257.     HiLink apacheOption Number
  258.     HiLink apacheComment Comment
  259.     HiLink apacheFixme Todo
  260.     HiLink apacheLimitSectionKeyword apacheLimitSection
  261.     HiLink apacheLimitSection apacheSection
  262.     HiLink apacheSection Label
  263.     HiLink apacheMethodOption Type
  264.     HiLink apacheAllowDeny Include
  265.     HiLink apacheAllowDenyValue Identifier
  266.     HiLink apacheOrder Special
  267.     HiLink apacheOrderValue String
  268.     HiLink apacheString String
  269.     HiLink apacheError Error
  270.     HiLink apacheUserID Number
  271.  
  272.     delcommand HiLink
  273. endif
  274.  
  275. let b:current_syntax = "apache"
  276.