📄 rexx.vim
字号:
" Vim syntax file" Language: Rexx" Maintainer: Thomas Geulig <geulig@nentec.de>" Last Change: 2001 May 2" URL: http://sites.netscape.net/sharpPeople/vim/syntax/rexx.vim" or http://www.crosswinds.net/~vimuser/vim/syntax/rexx.vim"" Special Thanks to Dan Sharp <dwsharp@hotmail.com> for comments and additions" (and providing the webspace)" For version 5.x: Clear all syntax items" For version 6.x: Quit when a syntax file was already loadedif version < 600 syntax clearelseif exists("b:current_syntax") finishendifsyn case ignore" A Keyword is the first symbol in a clause. A clause begins at the start" of a line or after a semicolon. THEN, ELSE, OTHERWISE, and colons are always" followed by an implied semicolon.syn match rexxClause "\(^\|;\|:\|then \|else \|otherwise \)\s*\w\+" contains=ALL" Considered keywords when used together in a phrase and begin a clausesyn match rexxKeyword contained "\<signal\( on \(error\|failure\|halt\|notready\|novalue\|syntax\|lostdigits\)\(\s\+name\)\=\)\=\>"syn match rexxKeyword contained "\<signal off \(error\|failure\|halt\|notready\|novalue\|syntax\|lostdigits\)\>"syn match rexxKeyword contained "\<call off \(error\|failure\|halt\|notready\)\>"syn match rexxKeyword contained "\<parse \(upper \)\=\(arg\|linein\|pull\|source\|var\|value\|version\)\>"syn match rexxKeyword contained "\<numeric \(digits\|form \(scientific\|engineering\|value\)\|fuzz\)\>"syn match rexxKeyword contained "\<\(address\|trace\)\( value\)\=\>"syn match rexxKeyword contained "\<procedure\( expose\)\=\>"syn match rexxKeyword contained "\<do\( forever\)\=\>"" Another keyword phrase, separated to aid highlighting in rexxFunctionsyn match rexxKeyword2 contained "\<call\( on \(error\|failure\|halt\|notready\)\(\s\+name\)\=\)\=\>"" Considered keywords when they begin a clausesyn match rexxKeyword contained "\<\(arg\|drop\|end\|exit\|if\|interpret\|iterate\|leave\|nop\)\>"syn match rexxKeyword contained "\<\(options\|pull\|push\|queue\|return\|say\|select\|trace\)\>"" Conditional phrasessyn match rexxConditional "\(^\s*\| \)\(to\|by\|for\|until\|while\|then\|when\|otherwise\|else\)\( \|\s*$\)" contains=ALLBUT,rexxConditionalsyn match rexxConditional contained "\<\(to\|by\|for\|until\|while\|then\|when\|else\|otherwise\)\>"" Assignments -- a keyword followed by an equal sign becomes a variablesyn match rexxAssign "\<\w\+\s*=\s*" contains=rexxSpecialVariable" Functions/Proceduressyn match rexxFunction "\<\h\w*\(/\*\s*\*/\)*("me=e-1 contains=rexxComment,rexxConditional,rexxKeywordsyn match rexxFunction "\<\(arg\|trace\)\(/\*\s*\*/\)*("me=e-1syn match rexxFunction "\<call\( on \(error\|failure\|halt\|notready\)\(\s\+name\)\=\)\=\>\s\+\w\+\>" contains=rexxKeyword2" String constantssyn region rexxString start=+"+ skip=+\\\\\|\\'+ end=+"+syn region rexxString start=+'+ skip=+\\\\\|\\"+ end=+'+syn match rexxCharacter +"'[^\\]'"+" Catch errors caused by wrong parenthesissyn region rexxParen transparent start='(' end=')' contains=ALLBUT,rexxParenError,rexxTodo,rexxUserLabel,rexxKeywordsyn match rexxParenError ")"syn match rexxInParen "[\\[\\]{}]"" Commentssyn region rexxComment start="/\*" end="\*/" contains=rexxTodo,rexxCommentsyn match rexxCommentError "\*/"syn keyword rexxTodo contained TODO FIXME XXX" Highlight User Labelssyn match rexxUserLabel "\<\I\i*\s*:"me=e-1" Special Variablessyn keyword rexxSpecialVariable sigl rc resultsyn match rexxCompoundVariable "\<\w\+\.\w*\>"if !exists("rexx_minlines") let rexx_minlines = 10endifexec "syn sync ccomment rexxComment minlines=" . rexx_minlines" 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_rexx_syn_inits") if version < 508 let did_rexx_syn_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink rexxUserLabel Function HiLink rexxCharacter Character HiLink rexxParenError rexxError HiLink rexxInParen rexxError HiLink rexxCommentError rexxError HiLink rexxError Error HiLink rexxKeyword Statement HiLink rexxKeyword2 rexxKeyword HiLink rexxFunction Function HiLink rexxString String HiLink rexxComment Comment HiLink rexxTodo Todo HiLink rexxSpecialVariable Special HiLink rexxConditional rexxKeyword delcommand HiLinkendiflet b:current_syntax = "rexx""vim: ts=8
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -