Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
uc.vim166 linesDownload Raw Back to syntax
1" Vim syntax file2" Language:	UnrealScript3" Maintainer:	Mark Ferrell <major@chaoticdreams.org>4" URL:		ftp://ftp.chaoticdreams.org/pub/ut/vim/uc.vim5" Credits:	Based on the java.vim syntax file by Claudio Fleiner6" Last change:	2003 May 317 8" Please check :help uc.vim for comments on some of the options available.9 10" quit when a syntax file was already loaded11if exists("b:current_syntax")12  finish13endif14 15" some characters that cannot be in a UnrealScript program (outside a string)16syn match ucError "[\\@`]"17syn match ucError "<<<\|\.\.\|=>\|<>\|||=\|&&=\|[^-]->\|\*\/"18 19" we define it here so that included files can test for it20if !exists("main_syntax")21  let main_syntax='uc'22endif23 24syntax case ignore25 26" keyword definitions27syn keyword ucBranch	      break continue28syn keyword ucConditional     if else switch29syn keyword ucRepeat	      while for do foreach30syn keyword ucBoolean	      true false31syn keyword ucConstant	      null32syn keyword ucOperator	      new instanceof33syn keyword ucType	      boolean char byte short int long float double34syn keyword ucType	      void Pawn sound state auto exec function ipaddr35syn keyword ucType	      ELightType actor ammo defaultproperties bool36syn keyword ucType	      native noexport var out vector name local string37syn keyword ucType	      event38syn keyword ucStatement       return39syn keyword ucStorageClass    static synchronized transient volatile final40syn keyword ucMethodDecl      synchronized throws41 42" UnrealScript defines classes in sorta fscked up fashion43syn match   ucClassDecl       "^[Cc]lass[\s$]*\S*[\s$]*expands[\s$]*\S*;" contains=ucSpecial,ucSpecialChar,ucClassKeys44syn keyword ucClassKeys	      class expands extends45syn match   ucExternal	      "^\#exec.*" contains=ucCommentString,ucNumber46syn keyword ucScopeDecl       public protected private abstract47 48" UnrealScript Functions49syn match   ucFuncDef	      "^.*function\s*[\(]*" contains=ucType,ucStorageClass50syn match   ucEventDef	      "^.*event\s*[\(]*" contains=ucType,ucStorageClass51syn match   ucClassLabel      "[a-zA-Z0-9]*\'[a-zA-Z0-9]*\'" contains=ucCharacter52 53syn region  ucLabelRegion     transparent matchgroup=ucLabel start="\<case\>" matchgroup=NONE end=":" contains=ucNumber54syn match   ucUserLabel       "^\s*[_$a-zA-Z][_$a-zA-Z0-9_]*\s*:"he=e-1 contains=ucLabel55syn keyword ucLabel	      default56 57" The following cluster contains all java groups except the contained ones58syn 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,ucClassLabel59 60" Comments61syn keyword ucTodo	       contained TODO FIXME XXX62syn region  ucCommentString    contained start=+"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=ucSpecial,ucCommentStar,ucSpecialChar63syn region  ucComment2String   contained start=+"+  end=+$\|"+  contains=ucSpecial,ucSpecialChar64syn match   ucCommentCharacter contained "'\\[^']\{1,6\}'" contains=ucSpecialChar65syn match   ucCommentCharacter contained "'\\''" contains=ucSpecialChar66syn match   ucCommentCharacter contained "'[^\\]'"67syn region  ucComment	       start="/\*"  end="\*/" contains=ucCommentString,ucCommentCharacter,ucNumber,ucTodo68syn match   ucCommentStar      contained "^\s*\*[^/]"me=e-169syn match   ucCommentStar      contained "^\s*\*$"70syn match   ucLineComment      "//.*" contains=ucComment2String,ucCommentCharacter,ucNumber,ucTodo71hi link ucCommentString ucString72hi link ucComment2String ucString73hi link ucCommentCharacter ucCharacter74 75syn cluster ucTop add=ucComment,ucLineComment76 77" match the special comment /**/78syn match   ucComment	       "/\*\*/"79 80" Strings and constants81syn match   ucSpecialError     contained "\\."82"syn match   ucSpecialCharError contained "[^']"83syn match   ucSpecialChar      contained "\\\([4-9]\d\|[0-3]\d\d\|[\"\\'ntbrf]\|u\x\{4\}\)"84syn region  ucString	       start=+"+ end=+"+  contains=ucSpecialChar,ucSpecialError85syn match   ucStringError      +"\([^"\\]\|\\.\)*$+86syn match   ucCharacter        "'[^']*'" contains=ucSpecialChar,ucSpecialCharError87syn match   ucCharacter        "'\\''" contains=ucSpecialChar88syn match   ucCharacter        "'[^\\]'"89syn match   ucNumber	       "\<\(0[0-7]*\|0[xX]\x\+\|\d\+\)[lL]\=\>"90syn match   ucNumber	       "\(\<\d\+\.\d*\|\.\d\+\)\([eE][-+]\=\d\+\)\=[fFdD]\="91syn match   ucNumber	       "\<\d\+[eE][-+]\=\d\+[fFdD]\=\>"92syn match   ucNumber	       "\<\d\+\([eE][-+]\=\d\+\)\=[fFdD]\>"93 94" unicode characters95syn match   ucSpecial "\\u\d\{4\}"96 97syn cluster ucTop add=ucString,ucCharacter,ucNumber,ucSpecial,ucStringError98 99" catch errors caused by wrong parenthesis100syn region  ucParen	       transparent start="(" end=")" contains=@ucTop,ucParen101syn match   ucParenError       ")"102hi link     ucParenError       ucError103 104if !exists("uc_minlines")105  let uc_minlines = 10106endif107exec "syn sync ccomment ucComment minlines=" . uc_minlines108 109" Define the default highlighting.110" Only when an item doesn't have highlighting yet111 112hi def link ucFuncDef			Conditional113hi def link ucEventDef			Conditional114hi def link ucBraces			Function115hi def link ucBranch			Conditional116hi def link ucLabel			Label117hi def link ucUserLabel			Label118hi def link ucConditional			Conditional119hi def link ucRepeat			Repeat120hi def link ucStorageClass			StorageClass121hi def link ucMethodDecl			ucStorageClass122hi def link ucClassDecl			ucStorageClass123hi def link ucScopeDecl			ucStorageClass124hi def link ucBoolean			Boolean125hi def link ucSpecial			Special126hi def link ucSpecialError			Error127hi def link ucSpecialCharError		Error128hi def link ucString			String129hi def link ucCharacter			Character130hi def link ucSpecialChar			SpecialChar131hi def link ucNumber			Number132hi def link ucError			Error133hi def link ucStringError			Error134hi def link ucStatement			Statement135hi def link ucOperator			Operator136hi def link ucOverLoaded			Operator137hi def link ucComment			Comment138hi def link ucDocComment			Comment139hi def link ucLineComment			Comment140hi def link ucConstant			ucBoolean141hi def link ucTypedef			Typedef142hi def link ucTodo				Todo143 144hi def link ucCommentTitle			SpecialComment145hi def link ucDocTags			Special146hi def link ucDocParam			Function147hi def link ucCommentStar			ucComment148 149hi def link ucType				Type150hi def link ucExternal			Include151 152hi def link ucClassKeys			Conditional153hi def link ucClassLabel			Conditional154 155hi def link htmlComment			Special156hi def link htmlCommentPart		Special157 158 159let b:current_syntax = "uc"160 161if main_syntax == 'uc'162  unlet main_syntax163endif164 165" vim: ts=8166 
codekingpro/portable-devtools · Team Ai