?? lex.vim
字號:
" Vim syntax file" Language: Lex" Maintainer: Dr. Charles E. Campbell, Jr. <Charles.E.Campbell.1@gsfc.nasa.gov>" Last Change: February 1, 2001" Option:" lex_uses_cpp : if this variable exists, then C++ is loaded rather than C" 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 C syntax to start withif version >= 600 if exists("lex_uses_cpp") runtime! syntax/cpp.vim else runtime! syntax/c.vim endif unlet b:current_syntaxelse if exists("lex_uses_cpp") so <sfile>:p:h/cpp.vim else so <sfile>:p:h/c.vim endifendif" --- Lex stuff ---"I'd prefer to use lex.* , but it doesn't handle forward definitions yetsyn cluster lexListGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatString,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,lexPatCode,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenErrorsyn cluster lexListPatCodeGroup contains=lexAbbrvBlock,lexAbbrv,lexAbbrv,lexAbbrvRegExp,lexInclude,lexPatBlock,lexPat,lexBrace,lexPatTag,lexPatTag,lexPatComment,lexPatCodeLine,lexMorePat,lexPatSep,lexSlashQuote,cInParen,cUserLabel,cOctalZero,cCppSkip,cErrInBracket,cErrInParen,cOctalError,cCppOut2,cCommentStartError,cParenError" Abbreviations Sectionsyn region lexAbbrvBlock start="^\([a-zA-Z_]\+\t\|%{\)" end="^%%$"me=e-2 skipnl nextgroup=lexPatBlock contains=lexAbbrv,lexInclude,lexAbbrvCommentsyn match lexAbbrv "^\I\i*\s"me=e-1 skipwhite contained nextgroup=lexAbbrvRegExpsyn match lexAbbrv "^%[sx]" containedsyn match lexAbbrvRegExp "\s\S.*$"lc=1 contained nextgroup=lexAbbrv,lexIncludesyn region lexInclude matchgroup=lexSep start="^%{" end="%}" contained contains=ALLBUT,@lexListGroupsyn region lexAbbrvComment start="^\s\+/\*" end="\*/""%% : Patterns {Actions}syn region lexPatBlock matchgroup=Todo start="^%%$" matchgroup=Todo end="^%%$" skipnl skipwhite contains=lexPat,lexPatTag,lexPatCommentsyn region lexPat start=+\S+ skip="\\\\\|\\." end="\s"me=e-1 contained nextgroup=lexMorePat,lexPatSep contains=lexPatString,lexSlashQuote,lexBracesyn region lexBrace start="\[" skip=+\\\\\|\\+ end="]" containedsyn region lexPatString matchgroup=String start=+"+ skip=+\\\\\|\\"+ matchgroup=String end=+"+ containedsyn match lexPatTag "^<\I\i*\(,\I\i*\)*>*" contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSepsyn match lexPatTag +^<\I\i*\(,\I\i*\)*>*\(\\\\\)*\\"+ contained nextgroup=lexPat,lexPatTag,lexMorePat,lexPatSepsyn region lexPatComment start="^\s*/\*" end="\*/" skipnl contained contains=cTodo nextgroup=lexPatComment,lexPat,lexPatString,lexPatTagsyn match lexPatCodeLine ".*$" contained contains=ALLBUT,@lexListGroupsyn match lexMorePat "\s*|\s*$" skipnl contained nextgroup=lexPat,lexPatTag,lexPatCommentsyn match lexPatSep "\s\+" contained nextgroup=lexMorePat,lexPatCode,lexPatCodeLinesyn match lexSlashQuote +\(\\\\\)*\\"+ containedsyn region lexPatCode matchgroup=Delimiter start="{" matchgroup=Delimiter end="}" skipnl contained contains=ALLBUT,@lexListPatCodeGroupsyn keyword lexCFunctions BEGIN input unput woutput yyleng yylook yytextsyn keyword lexCFunctions ECHO output winput wunput yyless yymore yywrap" <c.vim> includes several ALLBUTs; these have to be treated so as to exclude lex* groupssyn cluster cParenGroup add=lex.*syn cluster cDefineGroup add=lex.*syn cluster cPreProcGroup add=lex.*syn cluster cMultiGroup add=lex.*" Synchronizationsyn sync clearsyn sync minlines=300syn sync match lexSyncPat grouphere lexPatBlock "^%[a-zA-Z]"syn sync match lexSyncPat groupthere lexPatBlock "^<$"syn sync match lexSyncPat groupthere lexPatBlock "^%%$"" The default highlighting.hi def link lexSlashQuote lexPathi def link lexBrace lexPathi def link lexAbbrvComment lexPatCommenthi def link lexAbbrv SpecialCharhi def link lexAbbrvRegExp Macrohi def link lexCFunctions Functionhi def link lexMorePat SpecialCharhi def link lexPat Functionhi def link lexPatComment Commenthi def link lexPatString Functionhi def link lexPatTag Specialhi def link lexSep Delimiterlet b:current_syntax = "lex"" vim:ts=10
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -