📄 php.vim
字号:
syn match phpOctalError "[89]" containedsyn match phpParentError "[)}\]]" contained" Todosyn keyword phpTodo TODO Todo todo containedsyn cluster phpInside contains=phpComment,phpFunctions,phpIdentifier,phpConditional,phpRepeat,phpLabel,phpStatement,phpOperator,phpRelation,phpStringSingle,phpStringDouble,phpNumber,phpFloat,phpSpecialChar,phpParent,phpParentError,phpInclude,phpKeyword,phpType,phpIdentifierParent,phpBoolean,phpStructure,phpMethodssyn cluster phpTop contains=@phpInside,phpDefine,phpParentError,phpStorageClassif exists("php_parentError") syn region phpParent matchgroup=Delimiter start="(" end=")" contained contains=@phpInside syn region phpParent matchgroup=Delimiter start="{" end="}" contained contains=@phpTop syn region phpParent matchgroup=Delimiter start="\[" end="\]" contained contains=@phpInside if exists("php_noShortTags") syn region phpRegion keepend matchgroup=Delimiter start="<?php" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end="?>" contains=@phpTop else syn region phpRegion keepend matchgroup=Delimiter start="<?\(php\)\=" skip=+".\{-}?>.\{-}"\|'.\{-}?>.\{-}'\|/\*.\{-}?>.\{-}\*/+ end="?>" contains=@phpTop endif syn region phpRegion keepend matchgroup=Delimiter start=+<script language="php">+ skip=+".\{-}</script>.\{-}"\|'.\{-}</script>.\{-}'\|/\*.\{-}</script>.\{-}\*/+ end=+</script>+ contains=@phpTop if exists("php_asp_tags") syn region phpRegion keepend matchgroup=Delimiter start="<%\(=\)\=" skip=+".\{-}%>.\{-}"\|'.\{-}%>.\{-}'\|/\*.\{-}%>.\{-}\*/+ end="%>" contains=@phpTop endifelse syn match phpParent "[({[\]})]" contained if exists("php_noShortTags") syn region phpRegion matchgroup=Delimiter start="<?php" end="?>" contains=@phpTop else syn region phpRegion matchgroup=Delimiter start="<?\(php\)\=" end="?>" contains=@phpTop endif syn region phpRegion matchgroup=Delimiter start=+<script language="php">+ end=+</script>+ contains=@phpTop if exists("php_asp_tags") syn region phpRegion matchgroup=Delimiter start="<%\(=\)\=" end="%>" contains=@phpTop endifendif" syncif exists("php_minlines") exec "syn sync minlines=" . php_minlineselse syn sync minlines=100endif" 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_php_syn_inits") if version < 508 let did_php_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink phpComment Comment HiLink phpBoolean Boolean HiLink phpStorageClass StorageClass HiLink phpStructure Structure HiLink phpStringSingle String HiLink phpStringDouble String HiLink phpNumber Number HiLink phpFloat Float HiLink phpFunctions Function HiLink phpBaselib Function HiLink phpRepeat Repeat HiLink phpConditional Conditional HiLink phpLabel Label HiLink phpStatement Statement HiLink phpKeyword Statement HiLink phpType Type HiLink phpInclude Include HiLink phpDefine Define HiLink phpSpecialChar SpecialChar HiLink phpParent Delimiter HiLink phpParentError Error HiLink phpOctalError Error HiLink phpTodo Todo HiLink phpMemberSelector Structure HiLink phpNoEnd Operator if exists("php_oldStyle") hi phpIntVar guifg=Red ctermfg=DarkRed hi phpEnvVar guifg=Red ctermfg=DarkRed hi phpOperator guifg=SeaGreen ctermfg=DarkGreen hi phpVarSelector guifg=SeaGreen ctermfg=DarkGreen hi phpRelation guifg=SeaGreen ctermfg=DarkGreen hi phpIdentifier guifg=DarkGray ctermfg=Brown else HiLink phpIntVar Identifier HiLink phpEnvVar Identifier HiLink phpOperator Operator HiLink phpVarSelector Operator HiLink phpRelation Operator HiLink phpIdentifier Identifier endif delcommand HiLinkendiflet b:current_syntax = "php"if main_syntax == 'php' unlet main_syntaxendif" vim: ts=8
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -