📄 uc.vim
字号:
" Vim syntax file" Language: UnrealScript" Maintainer: Mark Ferrell <major@chaoticdreams.org>" URL: ftp://ftp.chaoticdreams.org/pub/ut/vim/uc.vim" Credits: Based on the java.vim syntax file by Claudio Fleiner" Last change: 2001 May 10" Please check :help uc.vim for comments on some of the options available." 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" some characters that cannot be in a UnrealScript program (outside a string)syn match ucError "[\\@`]"syn match ucError "<<<\|\.\.\|=>\|<>\|||=\|&&=\|[^-]->\|\*\/"" we define it here so that included files can test for itif !exists("main_syntax") let main_syntax='uc'endifsyntax case ignore" keyword definitionssyn keyword ucBranch break continuesyn keyword ucConditional if else switchsyn keyword ucRepeat while for do foreachsyn keyword ucBoolean true falsesyn keyword ucConstant nullsyn keyword ucOperator new instanceofsyn keyword ucType boolean char byte short int long float doublesyn keyword ucType void Pawn sound state auto exec function ipaddrsyn keyword ucType ELightType actor ammo defaultproperties boolsyn keyword ucType native noexport var out vector name local stringsyn keyword ucType eventsyn keyword ucStatement returnsyn keyword ucStorageClass static synchronized transient volatile finalsyn keyword ucMethodDecl synchronized throws" UnrealScript defines classes in sorta fscked up fashionsyn match ucClassDecl "^[Cc]lass[\s$]*\S*[\s$]*expands[\s$]*\S*;" contains=ucSpecial,ucSpecialChar,ucClassKeyssyn keyword ucClassKeys class expands extendssyn match ucExternal "^\#exec.*" contains=ucCommentString,ucNumbersyn keyword ucScopeDecl public protected private abstract" UnrealScript Functionssyn match ucFuncDef "^.*function\s*[\(]*" contains=ucType,ucStorageClasssyn match ucEventDef "^.*event\s*[\(]*" contains=ucType,ucStorageClasssyn match ucClassLabel "[a-zA-Z0-9]*\'[a-zA-Z0-9]*\'" contains=ucCharactersyn region ucLabelRegion transparent matchgroup=ucLabel start="\<case\>" matchgroup=NONE end=":" contains=ucNumbersyn match ucUserLabel "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=ucLabelsyn keyword ucLabel default" The following cluster contains all java groups except the contained onessyn cluster ucTop contains=ucExternal,ucError,ucError,ucBranch,ucLabelRegion,ucLabel,ucConditional,ucRepeat,ucBoolean,ucConstant,ucTypedef,ucOperator,ucType,ucType,ucStatement,ucStorageClass,ucMethodDecl,ucClassDecl,ucClassDecl,ucClassDecl,ucScopeDecl,ucError,ucError2,ucUserLabel,ucClassLabel" Commentssyn keyword ucTodo contained TODO FIXME XXXsyn region ucCommentString contained start=+"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=ucSpecial,ucCommentStar,ucSpecialCharsyn region ucComment2String contained start=+"+ end=+$\|"+ contains=ucSpecial,ucSpecialCharsyn match ucCommentCharacter contained "'\\[^']\{1,6\}'" contains=ucSpecialCharsyn match ucCommentCharacter contained "'\\''" contains=ucSpecialCharsyn match ucCommentCharacter contained "'[^\\]'"syn region ucComment start="/\*" end="\*/" contains=ucCommentString,ucCommentCharacter,ucNumber,ucTodosyn match ucCommentStar contained "^\s*\*[^/]"me=e-1syn match ucCommentStar contained "^\s*\*$"syn match ucLineComment "//.*" contains=ucComment2String,ucCommentCharacter,ucNumber,ucTodohi link ucCommentString ucStringhi link ucComment2String ucStringhi link ucCommentCharacter ucCharactersyn cluster ucTop add=ucComment,ucLineComment" match the special comment /**/syn match ucComment "/\*\*/"" Strings and constantssyn match ucSpecialError contained "\\.""syn match ucSpecialCharError contained "[^']"syn match ucSpecialChar contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)"syn region ucString start=+"+ end=+"+ contains=ucSpecialChar,ucSpecialErrorsyn match ucStringError +"\([^"\\]\|\\.\)*$+syn match ucCharacter "'[^']*'" contains=ucSpecialChar,ucSpecialCharErrorsyn match ucCharacter "'\\''" contains=ucSpecialCharsyn match ucCharacter "'[^\\]'"syn match ucNumber "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"syn match ucNumber "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="syn match ucNumber "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"syn match ucNumber "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"" unicode characterssyn match ucSpecial "\\u\d\{4\}"syn cluster ucTop add=ucString,ucCharacter,ucNumber,ucSpecial,ucStringError" catch errors caused by wrong parenthesissyn region ucParen transparent start="(" end=")" contains=@ucTop,ucParensyn match ucParenError ")"hi link ucParenError ucErrorif !exists("uc_minlines") let uc_minlines = 10endifexec "syn sync ccomment ucComment minlines=" . uc_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_uc_syntax_inits") if version < 508 let did_uc_syntax_inits = 1 command -nargs=+ HiLink hi link <args> else command -nargs=+ HiLink hi def link <args> endif HiLink ucFuncDef Conditional HiLink ucEventDef Conditional HiLink ucBraces Function HiLink ucBranch Conditional HiLink ucLabel Label HiLink ucUserLabel Label HiLink ucConditional Conditional HiLink ucRepeat Repeat HiLink ucStorageClass StorageClass HiLink ucMethodDecl ucStorageClass HiLink ucClassDecl ucStorageClass HiLink ucScopeDecl ucStorageClass HiLink ucBoolean Boolean HiLink ucSpecial Special HiLink ucSpecialError Error HiLink ucSpecialCharError Error HiLink ucString String HiLink ucCharacter Character HiLink ucSpecialChar SpecialChar HiLink ucNumber Number HiLink ucError Error HiLink ucStringError Error HiLink ucStatement Statement HiLink ucOperator Operator HiLink ucOverLoaded Operator HiLink ucComment Comment HiLink ucDocComment Comment HiLink ucLineComment Comment HiLink ucConstant ucBoolean HiLink ucTypedef Typedef HiLink ucTodo Todo HiLink ucCommentTitle SpecialComment HiLink ucDocTags Special HiLink ucDocParam Function HiLink ucCommentStar ucComment HiLink ucType Type HiLink ucExternal Include HiLink ucClassKeys Conditional HiLink ucClassLabel Conditional HiLink htmlComment Special HiLink htmlCommentPart Special delcommand HiLinkendiflet b:current_syntax = "uc"if main_syntax == 'uc' unlet main_syntaxendif" vim: ts=8
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -