📄 aflex.vim
字号:
" Vim syntax file" Language: AfLex (from Lex syntax file)" Maintainer: Mathieu Clabaut <mathieu.clabaut@free.fr>" LastChange: 02 May 2001" Original: Lex, maintained by Dr. Charles E. Campbell, Jr." <Charles.Campbell@gsfc.nasa.gov>" Comment: Replaced sourcing c.vim file by ada.vim and rename lex*" in aflex*" 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") finishendif" Read the Ada syntax to start withif version < 600 so <sfile>:p:h/ada.vimelse runtime! syntax/ada.vim unlet b:current_syntaxendif" --- AfLex stuff ---"I'd prefer to use aflex.* , but it doesn't handle forward definitions yetsyn cluster aflexListGroup contains=aflexAbbrvBlock,aflexAbbrv,aflexAbbrv,aflexAbbrvRegExp,aflexInclude,aflexPatBlock,aflexPat,aflexBrace,aflexPatString,aflexPatTag,aflexPatTag,aflexPatComment,aflexPatCodeLine,aflexMorePat,aflexPatSep,aflexSlashQuote,aflexPatCode,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2syn cluster aflexListPatCodeGroup contains=aflexAbbrvBlock,aflexAbbrv,aflexAbbrv,aflexAbbrvRegExp,aflexInclude,aflexPatBlock,aflexPat,aflexBrace,aflexPatTag,aflexPatTag,aflexPatComment,aflexPatCodeLine,aflexMorePat,aflexPatSep,aflexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2" Abbreviations Sectionsyn region aflexAbbrvBlock start="^\([a-zA-Z_]\+\t\|%{\)" end="^%%$"me=e-2 skipnl nextgroup=aflexPatBlock contains=aflexAbbrv,aflexInclude,aflexAbbrvCommentsyn match aflexAbbrv "^\I\i*\s"me=e-1 skipwhite contained nextgroup=aflexAbbrvRegExpsyn match aflexAbbrv "^%[sx]" containedsyn match aflexAbbrvRegExp "\s\S.*$"lc=1 contained nextgroup=aflexAbbrv,aflexIncludesyn region aflexInclude matchgroup=aflexSep start="^%{" end="%}" contained contains=ALLBUT,@aflexListGroupsyn region aflexAbbrvComment start="^\s\+/\*" end="\*/""%% : Patterns {Actions}syn region aflexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=aflexPat,aflexPatTag,aflexPatCommentsyn region aflexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=aflexMorePat,aflexPatSep contains=aflexPatString,aflexSlashQuote,aflexBracesyn region aflexBrace start="\[" skip=+\\\\\|\\+ end="]" containedsyn region aflexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ containedsyn match aflexPatTag "^<\I\i*\(,\I\i*\)*>*" contained nextgroup=aflexPat,aflexPatTag,aflexMorePat,aflexPatSepsyn match aflexPatTag +^<\I\i*\(,\I\i*\)*>*\(\\\\\)*\\"+ contained nextgroup=aflexPat,aflexPatTag,aflexMorePat,aflexPatSepsyn region aflexPatComment start="^\s*/\*" end="\*/" skipnl contained contains=cTodo nextgroup=aflexPatComment,aflexPat,aflexPatString,aflexPatTagsyn match aflexPatCodeLine ".*$" contained contains=ALLBUT,@aflexListGroupsyn match aflexMorePat "\s*|\s*$" skipnl contained nextgroup=aflexPat,aflexPatTag,aflexPatCommentsyn match aflexPatSep "\s\+" contained nextgroup=aflexMorePat,aflexPatCode,aflexPatCodeLinesyn match aflexSlashQuote +\(\\\\\)*\\"+ containedsyn region aflexPatCode matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" skipnl contained contains=ALLBUT,@aflexListPatCodeGroupsyn keyword aflexCFunctions BEGIN input unput woutput yyleng yylook yytextsyn keyword aflexCFunctions ECHO output winput wunput yyless yymore yywrap" <c.vim> includes several ALLBUTs; these have to be treated so as to exclude aflex* groupssyn cluster cParenGroup add=aflex.*syn cluster cDefineGroup add=aflex.*syn cluster cPreProcGroup add=aflex.*syn cluster cMultiGroup add=aflex.*" Synchronizationsyn sync clearsyn sync minlines=300syn sync match aflexSyncPat grouphere aflexPatBlock "^%[a-zA-Z]"syn sync match aflexSyncPat groupthere aflexPatBlock "^<$"syn sync match aflexSyncPat groupthere aflexPatBlock "^%%$"" 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_aflex_syntax_inits") if version < 508 let did_aflex_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink aflexSlashQuote aflexPat HiLink aflexBrace aflexPat HiLink aflexAbbrvComment aflexPatComment HiLink aflexAbbrv SpecialChar HiLink aflexAbbrvRegExp Macro HiLink aflexCFunctions Function HiLink aflexMorePat SpecialChar HiLink aflexPat Function HiLink aflexPatComment Comment HiLink aflexPatString Function HiLink aflexPatTag Special HiLink aflexSep Delimiter delcommand HiLinkendiflet b:current_syntax = "aflex"" vim:ts=10
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -