📄 apache.vim
字号:
" Vim syntax file" Language: Apache configuration (httpd.conf, srm.conf, access.conf, .htaccess)" Maintainer: David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>" Last Change: 2001-05-13" URI: http://physics.muni.cz/~yeti/download/apache.vim" Notes: Last synced with apache-1.3.14." TODO: see particular FIXME's scattered through the file" make it really linewise?" + add `display' where appropriate" Setup {{{" React to possibly already-defined syntax." For version 5.x: Clear all syntax items unconditionally" For version 6.x: Quit when a syntax file was already loadedif version >= 600 if exists("b:current_syntax") finish endifelse syntax clearendif" Set iskeyword since we need really strange chars in keywords." For version 5.x: Set it globally" For version 6.x: Set it locallyif version >= 600 setlocal iskeyword=@,48-57,-,+,_else set iskeyword=@,48-57,-,+,_endifsyn case ignore" }}}" Base constructs {{{syn match apacheComment "^\s*#.*$" contains=apacheFixmesyn case matchsyn keyword apacheFixme FIXME TODO XXX NOTsyn case ignoresyn match apacheAnything "\s[^>]*" containedsyn match apacheError "\w\+" containedsyn region apacheString start=+"+ end=+"+ skip=+\\\\\|\\\"+" }}}" Core {{{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 Usersyn keyword apacheOption Any All On Off Double EMail DNS Min Minimal OS Prod ProductOnly Fullsyn keyword apacheOption emerg alert crit error warn notice info debugsyn keyword apacheOption registry script inetd standalonesyn keyword apacheOptionOption ExecCGI FollowSymLinks Includes IncludesNoExec Indexes MultiViews SymLinksIfOwnerMatchsyn keyword apacheOptionOption +ExecCGI +FollowSymLinks +Includes +IncludesNoExec +Indexes +MultiViews +SymLinksIfOwnerMatchsyn keyword apacheOptionOption -ExecCGI -FollowSymLinks -Includes -IncludesNoExec -Indexes -MultiViews -SymLinksIfOwnerMatchsyn keyword apacheOption user group valid-usersyn case matchsyn keyword apacheMethodOption GET POST PUT DELETE CONNECT OPTIONS TRACE PATCH PROPFIND PROPPATCH MKCOL COPY MOVE LOCK UNLOCK containedsyn case ignoresyn match apacheSection "<\/\=\(Directory\|DirectoryMatch\|Files\|FilesMatch\|IfModule\|IfDefine\|Location\|LocationMatch\|VirtualHost\)\+.*>" contains=apacheAnythingsyn match apacheLimitSection "<\/\=\(Limit\|LimitExcept\)\+.*>" contains=apacheLimitSectionKeyword,apacheMethodOption,apacheErrorsyn keyword apacheLimitSectionKeyword Limit LimitExcept containedsyn match apacheAuthType "AuthType\s.*$" contains=apacheAuthTypeValuesyn keyword apacheAuthTypeValue Basic Digestsyn match apacheAllowOverride "AllowOverride\s.*$" contains=apacheAllowOverrideValue,apacheCommentsyn keyword apacheAllowOverrideValue AuthConfig FileInfo Indexes Limit Options contained" }}}" Modules {{{" mod_accesssyn match apacheAllowDeny "Allow\s\+from.*$" contains=apacheAllowDenyValue,apacheCommentsyn match apacheAllowDeny "Deny\s\+from.*$" contains=apacheAllowDenyValue,apacheCommentsyn keyword apacheAllowDenyValue All None containedsyn match apacheOrder "^\s*Order\s.*$" contains=apacheOrderValue,apacheCommentsyn keyword apacheOrderValue Deny Allow contained" mod_actionssyn keyword apacheDeclaration Action Script" mod_aliassyn keyword apacheDeclaration Alias AliasMatch Redirect RedirectMatch RedirectTemp RedirectPermanent ScriptAlias ScriptAliasMatchsyn keyword apacheOption permanent temp seeother gone" mod_asis (no own directives)" mod_authsyn keyword apacheDeclaration AuthGroupFile AuthUserFile AuthAuthoritative" mod_auth_anonsyn keyword apacheDeclaration Anonymous Anonymous_Authoritative Anonymous_LogEmail Anonymous_MustGiveEmail Anonymous_NoUserID Anonymous_VerifyEmail" mod_auth_dbsyn keyword apacheDeclaration AuthDBGroupFile AuthDBUserFile AuthDBAuthoritative" mod_auth_dbmsyn keyword apacheDeclaration AuthDBMGroupFile AuthDBMUserFile AuthDBMAuthoritative" mod_auth_digestsyn keyword apacheDeclaration AuthDigestFile AuthDigestGroupFile AuthDigestQop AuthDigestNonceLifetime AuthDigestNonceFormat AuthDigestNcCheck AuthDigestAlgorithm AuthDigestDomainsyn keyword apacheOption none auth auth-int MD5 MD5-sess" mod_autoindexsyn keyword apacheDeclaration AddAlt AddAltByEncoding AddAltByType AddDescription AddIcon AddIconByEncoding AddIconByType DefaultIcon FancyIndexing HeaderName IndexIgnore IndexOptions IndexOrderDefault ReadmeNamesyn keyword apacheOption DescriptionWidth FancyIndexing FoldersFirst IconHeight IconsAreLinks IconWidth NameWidth ScanHTMLTitles SuppressColumnSorting SuppressDescription SuppressHTMLPreamble SuppressLastModified SuppressSizesyn keyword apacheOption Ascending Descending Name Date Size Description" mod_browsersyn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase" mod_cern_metasyn keyword apacheDeclaration MetaFiles MetaDir MetaSuffix" mod_cgisyn keyword apacheDeclaration ScriptLog ScriptLogLength ScriptLogBuffer" mod_dav" FXIME: not implemented---don't know anything about this module" mod_define" FXIME: we don't highlight user defined variables at allsyn keyword apacheDeclaration Define" mod_digestsyn keyword apacheDeclaration AuthDigestFile" mod_dirsyn keyword apacheDeclaration DirectoryIndex" mod_envsyn keyword apacheDeclaration PassEnv SetEnv UnsetEnv" mod_examplesyn keyword apacheDeclaration Example" mod_expiressyn keyword apacheDeclaration ExpiresActive ExpiresByType ExpiresDefault" mod_headerssyn keyword apacheDeclaration Headersyn keyword apacheOption set unset append add" mod_imapsyn keyword apacheDeclaration ImapMenu ImapDefault ImapBasesyn keyword apacheOption none formatted semiformatted unformattedsyn keyword apacheOption nocontent" mod_includesyn keyword apacheDeclaration XBitHacksyn keyword apacheOption on off full" mod_infosyn keyword apacheDeclaration AddModuleInfo" mod_isapisyn keyword apacheDeclaration ISAPIReadAheadBuffer ISAPILogNotSupported ISAPIAppendLogToErrors ISAPIAppendLogToQuery" mod_log_agentsyn keyword apacheDeclaration AgentLog" mod_log_configsyn keyword apacheDeclaration CookieLog CustomLog LogFormat TransferLog" mod_log_referersyn keyword apacheDeclaration RefererIgnore RefererLog" mod_mimesyn keyword apacheDeclaration AddCharset AddEncoding AddHandler AddLanguage AddType DefaultLanguage ForceType RemoveEncoding RemoveHandler RemoveType SetHandler TypesConfig" mod_mime_magicsyn keyword apacheDeclaration MimeMagicFile" mod_mmap_staticsyn keyword apacheDeclaration MMapFile" mod_negotiationsyn keyword apacheDeclaration CacheNegotiatedDocs LanguagePriority" mod_perl" FXIME: not implemented---for proper highligting the whole Perl thing has to" be embeded making vim incredibily s...l...o...w..." mod_proxysyn keyword apacheDeclaration ProxyRequests ProxyRemote ProxyPass ProxyPassReverse ProxyBlock AllowCONNECT ProxyReceiveBufferSize NoProxy ProxyDomain ProxyVia CacheRoot CacheSize CacheMaxExpire CacheDefaultExpire CacheLastModifiedFactor CacheGcInterval CacheDirLevels CacheDirLength CacheForceCompletion NoCachesyn keyword apacheOption block" mod_put" FXIME: not implemented---need some doc" mod_rewrite" FIXME: rewriting rules are not highlighted because I don't understand them...syn keyword apacheDeclaration RewriteEngine RewriteOptions RewriteLog RewriteLogLevel RewriteLock RewriteMap RewriteBase RewriteCond RewriteRulesyn keyword apacheOption inherit" mod_roamingsyn keyword apacheDeclaration RoamingAlias" mod_setenvifsyn keyword apacheDeclaration BrowserMatch BrowserMatchNoCase SetEnvIf SetEnvIfNoCase" mod_sosyn keyword apacheDeclaration LoadFile LoadModule" mod_spelingsyn keyword apacheDeclaration CheckSpelling" mod_ssl" FIXME: SSLCipherSuite parameters are not properly highlighted" FIXME: SSLRequire rules are not highlightedsyn keyword apacheDeclaration SSLPassPhraseDialog SSLMutex SSLRandomSeed SSLSessionCache SSLSessionCacheTimeout SSLEngine SSLProtocol SSLCipherSuite SSLCertificateFile SSLCertificateKeyFile SSLCertificateChainFile SSLCACertificatePath SSLCACertificateFile SSLCARevocationPath SSLCARevocationFile SSLVerifyClient SSLVerifyDepth SSLLog SSLLogLevel SSLOptions SSLRequireSSL SSLRequiresyn keyword apacheOption StdEnvVars CompatEnvVars ExportCertData FakeBasicAuth StrictRequire OptRenegotiatesyn keyword apacheOption +StdEnvVars +CompatEnvVars +ExportCertData +FakeBasicAuth +StrictRequire +OptRenegotiatesyn keyword apacheOption -StdEnvVars -CompatEnvVars -ExportCertData -FakeBasicAuth -StrictRequire -OptRenegotiatesyn keyword apacheOption builtin semsyn match apacheOption "\(file\|exec\|egd\|dbm\|shm\):"syn keyword apacheOption SSLv2 SSLv3 TLSv1 -SSLv2 -SSLv3 -TLSv1 +SSLv2 +SSLv3 +TLSv1syn keyword apacheOption optional require optional_no_ca" mod_statussyn keyword apacheDeclaration ExtendedStatus" mod_userdirsyn keyword apacheDeclaration UserDir" mod_usertracksyn keyword apacheDeclaration CookieExpires CookieName CookieTracking" mod_vhost_aliassyn keyword apacheDeclaration VirtualDocumentRoot VirtualDocumentRootIP VirtualScriptAlias VirtualScriptAliasIP" }}}" 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 || !exists("did_apache_syntax_inits") if version < 508 let did_apache_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink apacheAllowOverride apacheDeclaration HiLink apacheAllowOverrideValue apacheOption HiLink apacheAuthType apacheDeclaration HiLink apacheAuthTypeValue apacheOption HiLink apacheOptionOption apacheOption HiLink apacheDeclaration Function HiLink apacheAnything apacheOption HiLink apacheOption Number HiLink apacheComment Comment HiLink apacheFixme Todo HiLink apacheLimitSectionKeyword apacheLimitSection HiLink apacheLimitSection apacheSection HiLink apacheSection Label HiLink apacheMethodOption Type HiLink apacheAllowDeny Include HiLink apacheAllowDenyValue Identifier HiLink apacheOrder Special HiLink apacheOrderValue String HiLink apacheString Number HiLink apacheError Error delcommand HiLinkendif" }}}let b:current_syntax = "apache"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -