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