" Vim syntax file " Language: actionScript " Maintainer: Igor Dvorsky " URL: http://www.modesite.net/vim/actionscript.vim " Last Change: 2002 Sep 12 " For version 5.x: Clear all syntax items " For version 6.x: Quit when a syntax file was already loaded if !exists("main_syntax") if version < 600 syntax clear elseif exists("b:current_syntax") finish endif let main_syntax = 'actionscript' endif " based on "JavaScript" VIM syntax by Claudio Fleiner syn case ignore syn match actionScriptLineComment "\/\/.*$" syn match actionScriptCommentSkip "^[ \t]*\*\($\|[ \t]\+\)" syn region actionScriptCommentString start=+"+ skip=+\\\\\|\\"+ end=+"+ end=+\*/+me=s-1,he=s-1 contains=actionScriptSpecial,actionScriptCommentSkip,@htmlPreproc syn region actionScriptComment2String start=+"+ skip=+\\\\\|\\"+ end=+$\|"+ contains=actionScriptSpecial,@htmlPreproc syn region actionScriptComment start="/\*" end="\*/" contains=actionScriptCommentString,actionScriptCharacter,actionScriptNumber syn match actionScriptSpecial "\\\d\d\d\|\\." syn region actionScriptStringD start=+"+ skip=+\\\\\|\\"+ end=+"+ contains=actionScriptSpecial,@htmlPreproc syn region actionScriptStringS start=+'+ skip=+\\\\\|\\'+ end=+'+ contains=actionScriptSpecial,@htmlPreproc syn match actionScriptSpecialCharacter "'\\.'" syn match actionScriptNumber "-\=\<\d\+L\=\>\|0[xX][0-9a-fA-F]\+\>" syn keyword actionScriptConditional if else syn keyword actionScriptRepeat do while for in syn keyword actionScriptCase break continue switch case default syn keyword actionScriptConstructor new syn keyword actionScriptObjects arguments Array Boolean Date _global Math Number Object String super var this Accessibility Color Key _level Mouse _root Selection Sound Stage System TextFormat LoadVars XML XMLSocket syn keyword actionScriptStatement return with syn keyword actionScriptFunction function syn keyword actionScriptValue true false undefined null NaN syn keyword actionScriptArray concat join length pop push reverse shift slice sort sortOn splice toString unshift syn keyword actionScriptDate getDate getDay getFullYear getHours getMilliseconds getMinutes getMonth getSeconds getTime getTimezoneOffset getUTCDate getUTCDay getUTCFullYear getUTCHours getUTCMilliseconds getUTCMinutes getUTCMonth getUTCSeconds getYear setDate setFullYear setHours setMilliseconds setMinutes setMonth setSeconds setTime setUTCDate setUTCFullYear setUTCHours setUTCMilliseconds setUTCMinutes setUTCMonth setUTCSeconds setYear UTC syn keyword actionScriptMath abs acos asin atan atan2 ceil cos E exp floor log LOG2E LOG10E LN2 LN10 max min PI pow random round sin sqrt SQRT1_2 SQRT2 tan syn keyword actionScriptNumberObj MAX_VALUE MIN_VALUE NaN NEGATIVE_INFINITY POSITIVE_INFINITY valueOf syn keyword actionScriptObject addProperty __proto__ registerClass toString unwatch valueOf watch syn keyword actionScriptString charAt charCodeAt concat fromCharCode indexOf lastIndexOf length slice split substr substring toLowerCase toUpperCase syn keyword actionScriptColor getRGB getTransform setRGB setTransform syn keyword actionScriptKey addListener BACKSPACE CAPSLOCK CONTROL DELETEKEY DOWN END ENTER ESCAPE getAscii getCode HOME INSERT isDown isToggled LEFT onKeyDown onKeyUp PGDN PGUP removeListener RIGHT SHIFT SPACE TAB UP syn keyword actionScriptMouse hide onMouseDown onMouseUp onMouseMove syn keyword actionScriptSelection getBeginIndex getCaretIndex getEndIndex getFocus setFocus setSelection syn keyword actionScriptSound attachSound duration getBytesLoaded getBytesTotal getPan getTransform getVolume loadSound onLoad onSoundComplete position setPan setTransform setVolume start stop syn keyword actionScriptStage align height onResize scaleMode width syn keyword actionScriptSystem capabilities hasAudioEncoder hasAccessibility hasAudio hasMP3 language manufacturer os pixelAspectRatio screenColor screenDPI screenResolution.x screenResolution.y version hasVideoEncoder syn keyword actionScriptTextFormat align blockIndent bold bullet color font getTextExtent indent italic leading leftMargin rightMargin size tabStops target underline url syn keyword actionScriptCommunication contentType getBytesLoaded getBytesTotal load loaded onLoad send sendAndLoad toString syn keyword actionScriptXMLSocket close connect onClose onConnect onData onXML syn keyword actionScriptTextField autoSize background backgroundColor border borderColor bottomScroll embedFonts _focusrect getDepth getFontList getNewTextFormat getTextFormat hscroll html htmlText maxChars maxhscroll maxscroll multiline onChanged onScroller onSetFocus _parent password _quality removeTextField replaceSel restrict selectable etNewTextFormat setTextFormat text textColor textHeight textWidth type variable wordWrap var void with syn keyword actionScriptMethods callee caller _alpha attachMovie beginFill beginGradientFill clear createEmptyMovieClip createTextField _currentframe curveTo _droptarget duplicateMovieClip enabled endFill focusEnabled _framesloaded getBounds globalToLocal gotoAndPlay gotoAndStop _height _highquality hitArea hitTest lineStyle lineTo loadMovie loadVariables localToGlobal moveTo _name nextFrame onDragOut onDragOver onEnterFrame onKeyDown onKeyUp onKillFocus onMouseDown onMouseMove onMouseUp onPress onRelease onReleaseOutside onRollOut onRollOver onUnload play prevFrame removeMovieClip _rotation setMask _soundbuftime startDrag stopDrag swapDepths tabChildren tabIndex _target _totalframes trackAsMenu unloadMovie _url useHandCursor _visible _width _x _xmouse _xscale _y _ymouse _yscale tabEnabled asfunction call setInterval clearInterval setProperty stopAllSounds #initclip #endinitclip delete unescape escape eval apply prototype getProperty getTimer getURL getVersion ifFrameLoaded #include instanceof int new nextScene parseFloat parseInt prevScene print printAsBitmap printNum scroll set targetPath tellTarget toggleHighQuality trace typeof isActive syn match actionScriptBraces "()[{}]" " catch errors caused by wrong parenthesis syn match actionScriptInParen contained "[{}]" syn region actionScriptParen transparent start="(" end=")" contains=actionScriptParen,actionScript.* syn match actionScrParenError ")" if main_syntax == "actionscript" syn sync ccomment actionScriptComment endif " 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 yet if version >= 508 || !exists("did_actionscript_syn_inits") if version < 508 let did_actionscript_syn_inits = 1 command -nargs=+ HiLink hi link else command -nargs=+ HiLink hi def link endif HiLink actionScriptComment Comment HiLink actionScriptLineComment Comment HiLink actionScriptSpecial Special HiLink actionScriptStringS String HiLink actionScriptStringD String HiLink actionScriptCharacter Character HiLink actionScriptSpecialCharacter actionScriptSpecial HiLink actionScriptNumber actionScriptValue HiLink actionScriptBraces Function HiLink actionScriptError Error HiLink actionScrParenError actionScriptError HiLink actionScriptInParen actionScriptError HiLink actionScriptConditional Conditional HiLink actionScriptRepeat Repeat HiLink actionScriptCase Conditional HiLink actionScriptConstructor Operator HiLink actionScriptObjects Operator HiLink actionScriptStatement Statement HiLink actionScriptFunction Function HiLink actionScriptValue Boolean HiLink actionScriptArray Type HiLink actionScriptDate Type HiLink actionScriptMath Type HiLink actionScriptNumberObj Type HiLink actionScriptObject Function HiLink actionScriptString Type HiLink actionScriptColor Type HiLink actionScriptKey Type HiLink actionScriptMouse Type HiLink actionScriptSelection Type HiLink actionScriptSound Type HiLink actionScriptStage Type HiLink actionScriptSystem Type HiLink actionScriptTextFormat Type HiLink actionScriptCommunication Type HiLink actionScriptXMLSocket Type HiLink actionScriptTextField Type HiLink actionScriptMethods Type delcommand HiLink endif let b:current_syntax = "actionscript" if main_syntax == 'actionscript' unlet main_syntax endif " vim: ts=8