1" Vim syntax file 2" Language: ColdFusion 3" Maintainer: Toby Woodwark (toby.woodwark[email protected]) 4" Last Change: August 3, 2005 5" ColdFusion MX 7 6" Usage: Since ColdFusion has its own version of HTML comments 7" (<!--- --->) 8" make sure that you put 'let html_wrong_comments=1' in your .vimrc / 9" _vimrc file. 10 11" For version 5.x, clear all syntax items. 12" For version 6.x, quit when a syntax file was already loaded. 13if version < 600 14 syntax clear 15elseif exists("b:current_syntax") 16 finish 17endif 18 19" Use all the stuff from the HTML syntax file. 20if version < 600 21 source <sfile>:p:h/html.vim 22else 23 runtime! syntax/html.vim 24endif 25 26" Tag names. 27syn keyword cfTagName contained cfabort cfapplet cfapplication cfargument cfassociate cfbreak cfcache 28syn keyword cfTagName contained cfcalendar cfcase cfcatch cfchart cfchartdata cfchartseries cfcol cfcollection 29syn keyword cfTagName contained cfcomponent cfcontent cfcookie cfdefaultcase cfdirectory cfdocument 30syn keyword cfTagName contained cfdocumentitem cfdocumentsection cfdump cfelse cfelseif cferror cfexecute 31syn keyword cfTagName contained cfexit cffile cfflush cfform cfformgroup cfformitem cfftp cffunction cfgrid 32syn keyword cfTagName contained cfgridcolumn cfgridrow cfgridupdate cfheader cfhtmlhead cfhttp cfhttpparam cfif 33syn keyword cfTagName contained cfimport cfinclude cfindex cfinput cfinsert cfinvoke cfinvokeargument 34syn keyword cfTagName contained cfldap cflocation cflock cflog cflogin cfloginuser cflogout cfloop cfmail 35syn keyword cfTagName contained cfmailparam cfmailpart cfmodule cfNTauthenticate cfobject cfobjectcache 36syn keyword cfTagName contained cfoutput cfparam cfpop cfprocessingdirective cfprocparam cfprocresult 37syn keyword cfTagName contained cfproperty cfquery cfqueryparam cfregistry cfreport cfreportparam cfrethrow 38syn keyword cfTagName contained cfreturn cfsavecontent cfschedule cfscript cfsearch cfselect cfset cfsetting 39syn keyword cfTagName contained cfsilent cfslider cfstoredproc cfswitch cftable cftextarea cfthrow cftimer 40syn keyword cfTagName contained cftrace cftransaction cftree cftreeitem cftry cfupdate cfwddx cfxml 41 42" Tag parameters. 43syn keyword cfArg contained abort accept access accessible action addnewline addtoken addtoken agentname 44syn keyword cfArg contained align appendkey appletsource application applicationtimeout applicationtoken 45syn keyword cfArg contained archive argumentcollection arguments asciiextensionlist attachmentpath 46syn keyword cfArg contained attributecollection attributes attributes autowidth backgroundcolor 47syn keyword cfArg contained backgroundvisible basetag bcc bgcolor bind bindingname blockfactor body bold 48syn keyword cfArg contained border branch cachedafter cachedwithin casesensitive categories category 49syn keyword cfArg contained categorytree cc cfsqltype charset chartheight chartwidth checked class 50syn keyword cfArg contained clientmanagement clientstorage codebase colheaderalign colheaderbold 51syn keyword cfArg contained colheaderfont colheaderfontsize colheaderitalic colheaders colheadertextcolor 52syn keyword cfArg contained collection colorlist colspacing columns completepath component condition 53syn keyword cfArg contained connection contentid context contextbytes contexthighlightbegin 54syn keyword cfArg contained contexthighlightend contextpassages cookiedomain criteria custom1 custom2 55syn keyword cfArg contained custom3 custom4 data dataalign databackgroundcolor datacollection 56syn keyword cfArg contained datalabelstyle datasource date daynames dbname dbserver dbtype dbvarname debug 57syn keyword cfArg contained default delete deletebutton deletefile delimiter delimiters description 58syn keyword cfArg contained destination detail directory disabled display displayname disposition dn domain 59syn keyword cfArg contained enablecab enablecfoutputonly enabled encoded encryption enctype enddate 60syn keyword cfArg contained endrange endrow endtime entry errorcode exception existing expand expires 61syn keyword cfArg contained expireurl expression extendedinfo extends extensions external failifexists 62syn keyword cfArg contained failto file filefield filename filter firstdayofweek firstrowasheaders font 63syn keyword cfArg contained fontbold fontembed fontitalic fontsize foregroundcolor format formfields 64syn keyword cfArg contained formula from generateuniquefilenames getasbinary grid griddataalign gridlines 65syn keyword cfArg contained groovecolor group groupcasesensitive header headeralign headerbold headerfont 66syn keyword cfArg contained headerfontsize headeritalic headerlines headertextcolor height highlighthref 67syn keyword cfArg contained hint href hrefkey hscroll hspace htmltable id idletimeout img imgopen imgstyle 68syn keyword cfArg contained index inline input insert insertbutton interval isolation italic item 69syn keyword cfArg contained itemcolumn key keyonly label labelformat language list listgroups locale 70syn keyword cfArg contained localfile log loginstorage lookandfeel mailerid mailto marginbottom marginleft 71syn keyword cfArg contained marginright marginright margintop markersize markerstyle mask maxlength maxrows 72syn keyword cfArg contained message messagenumber method mimeattach mimetype mode modifytype monthnames 73syn keyword cfArg contained multipart multiple name namecomplict nameconflict namespace new newdirectory 74syn keyword cfArg contained notsupported null numberformat object omit onchange onclick onerror onkeydown 75syn keyword cfArg contained onkeyup onload onmousedown onmouseup onreset onsubmit onvalidate operation 76syn keyword cfArg contained orderby orientation output outputfile overwrite ownerpassword pageencoding 77syn keyword cfArg contained pageheight pagetype pagewidth paintstyle param_1 param_2 param_3 param_4 78syn keyword cfArg contained param_5 parent passive passthrough password path pattern permissions picturebar 79syn keyword cfArg contained pieslicestyle port porttypename prefix preloader preservedata previouscriteria 80syn keyword cfArg contained procedure protocol provider providerdsn proxybypass proxypassword proxyport 81syn keyword cfArg contained proxyserver proxyuser publish query queryasroot queryposition range rebind 82syn keyword cfArg contained recurse redirect referral refreshlabel remotefile replyto report requesttimeout 83syn keyword cfArg contained required reset resolveurl result resultset retrycount returnasbinary returncode 84syn keyword cfArg contained returntype returnvariable roles rowheaderalign rowheaderbold rowheaderfont 85syn keyword cfArg contained rowheaderfontsize rowheaderitalic rowheaders rowheadertextcolor rowheaderwidth 86syn keyword cfArg contained rowheight scale scalefrom scaleto scope scriptprotect scriptsrc secure 87syn keyword cfArg contained securitycontext select selectcolor selected selecteddate selectedindex 88syn keyword cfArg contained selectmode separator seriescolor serieslabel seriesplacement server serviceport 89syn keyword cfArg contained serviceportname sessionmanagement sessiontimeout setclientcookies setcookie 90syn keyword cfArg contained setdomaincookies show3d showborder showdebugoutput showerror showlegend 91syn keyword cfArg contained showmarkers showxgridlines showygridlines size skin sort sortascendingbutton 92syn keyword cfArg contained sortcontrol sortdescendingbutton sortxaxis source spoolenable sql src start 93syn keyword cfArg contained startdate startrange startrow starttime status statuscode statust step 94syn keyword cfArg contained stoponerror style subject suggestions suppresswhitespace tablename tableowner 95syn keyword cfArg contained tablequalifier taglib target task template text textcolor textqualifier 96syn keyword cfArg contained thread throwonerror throwonfailure throwontimeout time timeout timespan tipbgcolor tipstyle 97syn keyword cfArg contained title to tooltip top toplevelvariable transfermode type uid unit url urlpath 98syn keyword cfArg contained useragent username userpassword usetimezoneinfo validate validateat value 99syn keyword cfArg contained valuecolumn values valuesdelimiter valuesdisplay var variable vertical visible 100syn keyword cfArg contained vscroll vspace webservice width wmode wraptext wsdlfile xaxistitle xaxistype 101syn keyword cfArg contained xoffset yaxistitle yaxistype yoffset 102 103" ColdFusion Functions. 104syn keyword cfFunctionName contained Abs GetFunctionList Max ACos GetGatewayHelper Mid AddSOAPRequestHeader 105syn keyword cfFunctionName contained GetHttpRequestData Min AddSOAPResponseHeader GetHttpTimeString Minute 106syn keyword cfFunctionName contained ArrayAppend GetLocale Month ArrayAvg GetLocaleDisplayName MonthAsString 107syn keyword cfFunctionName contained ArrayClear GetMetaData Now ArrayDeleteAt GetMetricData NumberFormat 108syn keyword cfFunctionName contained ArrayInsertAt GetPageContext ParagraphFormat ArrayIsEmpty GetProfileSections 109syn keyword cfFunctionName contained ParseDateTime ArrayLen GetProfileString Pi ArrayMax GetSOAPRequest 110syn keyword cfFunctionName contained PreserveSingleQuotes ArrayMin GetSOAPRequestHeader Quarter ArrayNew 111syn keyword cfFunctionName contained GetSOAPResponse QueryAddColumn ArrayPrepend GetSOAPResponseHeader QueryAddRow 112syn keyword cfFunctionName contained ArrayResize GetTempDirectory QueryNew ArraySet GetTempFile QuerySetCell 113syn keyword cfFunctionName contained ArraySort GetTickCount QuotedValueList ArraySum GetTimeZoneInfo Rand ArraySwap 114syn keyword cfFunctionName contained GetToken Randomize ArrayToList Hash RandRange Asc Hour REFind ASin 115syn keyword cfFunctionName contained HTMLCodeFormat REFindNoCase Atn HTMLEditFormat ReleaseComObject BinaryDecode 116syn keyword cfFunctionName contained IIf RemoveChars BinaryEncode IncrementValue RepeatString BitAnd InputBaseN 117syn keyword cfFunctionName contained Replace BitMaskClear Insert ReplaceList BitMaskRead Int ReplaceNoCase 118syn keyword cfFunctionName contained BitMaskSet IsArray REReplace BitNot IsBinary REReplaceNoCase BitOr IsBoolean 119syn keyword cfFunctionName contained Reverse BitSHLN IsCustomFunction Right BitSHRN IsDate RJustify BitXor 120syn keyword cfFunctionName contained IsDebugMode Round Ceiling IsDefined RTrim CharsetDecode IsLeapYear Second 121syn keyword cfFunctionName contained CharsetEncode IsNumeric SendGatewayMessage Chr IsNumericDate SetEncoding 122syn keyword cfFunctionName contained CJustify IsObject SetLocale Compare IsQuery SetProfileString CompareNoCase 123syn keyword cfFunctionName contained IsSimpleValue SetVariable Cos IsSOAPRequest Sgn CreateDate IsStruct Sin 124syn keyword cfFunctionName contained CreateDateTime IsUserInRole SpanExcluding CreateObject IsValid SpanIncluding 125syn keyword cfFunctionName contained CreateODBCDate IsWDDX Sqr CreateODBCDateTime IsXML StripCR CreateODBCTime 126syn keyword cfFunctionName contained IsXmlAttribute StructAppend CreateTime IsXmlDoc StructClear CreateTimeSpan 127syn keyword cfFunctionName contained IsXmlElem StructCopy CreateUUID IsXmlNode StructCount DateAdd IsXmlRoot 128syn keyword cfFunctionName contained StructDelete DateCompare JavaCast StructFind DateConvert JSStringFormat 129syn keyword cfFunctionName contained StructFindKey DateDiff LCase StructFindValue DateFormat Left StructGet 130syn keyword cfFunctionName contained DatePart Len StructInsert Day ListAppend StructIsEmpty DayOfWeek 131syn keyword cfFunctionName contained ListChangeDelims StructKeyArray DayOfWeekAsString ListContains StructKeyExists 132syn keyword cfFunctionName contained DayOfYear ListContainsNoCase StructKeyList DaysInMonth ListDeleteAt StructNew 133syn keyword cfFunctionName contained DaysInYear ListFind StructSort DE ListFindNoCase StructUpdate DecimalFormat 134syn keyword cfFunctionName contained ListFirst Tan DecrementValue ListGetAt TimeFormat Decrypt ListInsertAt 135syn keyword cfFunctionName contained ToBase64 DeleteClientVariable ListLast ToBinary DirectoryExists ListLen 136syn keyword cfFunctionName contained ToScript DollarFormat ListPrepend ToString Duplicate ListQualify Trim Encrypt 137syn keyword cfFunctionName contained ListRest UCase Evaluate ListSetAt URLDecode Exp ListSort URLEncodedFormat 138syn keyword cfFunctionName contained ExpandPath ListToArray URLSessionFormat FileExists ListValueCount Val Find 139syn keyword cfFunctionName contained ListValueCountNoCase ValueList FindNoCase LJustify Week FindOneOf Log Wrap 140syn keyword cfFunctionName contained FirstDayOfMonth Log10 WriteOutput Fix LSCurrencyFormat XmlChildPos FormatBaseN 141syn keyword cfFunctionName contained LSDateFormat XmlElemNew GetTempDirectory LSEuroCurrencyFormat XmlFormat 142syn keyword cfFunctionName contained GetAuthUser LSIsCurrency XmlGetNodeType GetBaseTagData LSIsDate XmlNew 143syn keyword cfFunctionName contained GetBaseTagList LSIsNumeric XmlParse GetBaseTemplatePath LSNumberFormat 144syn keyword cfFunctionName contained XmlSearch GetClientVariablesList LSParseCurrency XmlTransform 145syn keyword cfFunctionName contained GetCurrentTemplatePath LSParseDateTime XmlValidate GetDirectoryFromPath 146syn keyword cfFunctionName contained LSParseEuroCurrency Year GetEncoding LSParseNumber YesNoFormat GetException 147syn keyword cfFunctionName contained LSTimeFormat GetFileFromPath LTrim 148 149syn cluster htmlTagNameCluster add=cfTagName 150syn cluster htmlArgCluster add=cfArg,cfFunctionName 151 152syn region cfFunctionRegion start='#' end='#' contains=cfFunctionName 153 154" Define the default highlighting. 155" For version 5.x and earlier, only when not done already. 156" For version 5.8 and later, only when an item doesn't have highlighting yet. 157if version >= 508 || !exists("did_cf_syn_inits") 158 if version < 508 159 let did_cf_syn_inits = 1 160 command -nargs=+ HiLink hi link <args> 161 else 162 command -nargs=+ HiLink hi def link <args> 163 endif 164 165 HiLink cfTagName Statement 166 HiLink cfArg Type 167 HiLink cfFunctionName Function 168 HiLink cfFunctionRegion PreProc 169 170 delcommand HiLink 171endif 172 173let b:current_syntax = "cf" 174 175" vim: ts=8 sw=2 176