annotate runtime/syntax/cf.vim @ 27:a01d8d9b2a58 first-working-version

first working version.
author kono
date Mon, 27 Oct 2008 18:28:11 +0900
parents 76efa0be13f1
children e170173ecb68
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
1 " Vim syntax file
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
2 " Language: ColdFusion
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
3 " Maintainer: Toby Woodwark (toby.woodwark+vim@gmail.com)
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
4 " Last Change: 2005 Nov 25
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
5 " Filenames: *.cfc *.cfm
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
6 " Version: Macromedia ColdFusion MX 7
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
7 " Usage: Note that ColdFusion has its own comment syntax
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
8 " i.e. <!--- --->
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
9
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
10 " For version 5.x, clear all syntax items.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
11 " For version 6.x+, quit if a syntax file is already loaded.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
12 if version < 600
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
13 syntax clear
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
14 elseif exists("b:current_syntax")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
15 finish
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
16 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
17
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
18 " Use all the stuff from the HTML syntax file.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
19 " TODO remove this; CFML is not a superset of HTML
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
20 if version < 600
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
21 source <sfile>:p:h/html.vim
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
22 else
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
23 runtime! syntax/html.vim
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
24 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
25
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
26 syn sync fromstart
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
27 syn sync maxlines=200
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
28 syn case ignore
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
29
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
30 " Scopes and keywords.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
31 syn keyword cfScope contained cgi cffile request caller this thistag cfcatch variables application server session client form url attributes arguments
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
32 syn keyword cfBool contained yes no true false
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
33
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
34 " Operator strings.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
35 " Not exhaustive, since there are longhand equivalents.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
36 syn keyword cfOperator contained xor eqv and or lt le lte gt ge gte eq neq not is mod contains
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
37 syn match cfOperatorMatch contained "[\+\-\*\/\\\^\&][\+\-\*\/\\\^\&]\@!"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
38 syn cluster cfOperatorCluster contains=cfOperator,cfOperatorMatch
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
39
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
40 " Tag names.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
41 syn keyword cfTagName contained cfabort cfapplet cfapplication cfargument cfassociate cfbreak cfcache
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
42 syn keyword cfTagName contained cfcalendar cfcase cfcatch cfchart cfchartdata cfchartseries cfcol cfcollection
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
43 syn keyword cfTagName contained cfcomponent cfcontent cfcookie cfdefaultcase cfdirectory cfdocument
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
44 syn keyword cfTagName contained cfdocumentitem cfdocumentsection cfdump cfelse cfelseif cferror cfexecute
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
45 syn keyword cfTagName contained cfexit cffile cfflush cfform cfformgroup cfformitem cfftp cffunction cfgrid
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
46 syn keyword cfTagName contained cfgridcolumn cfgridrow cfgridupdate cfheader cfhtmlhead cfhttp cfhttpparam cfif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
47 syn keyword cfTagName contained cfimport cfinclude cfindex cfinput cfinsert cfinvoke cfinvokeargument
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
48 syn keyword cfTagName contained cfldap cflocation cflock cflog cflogin cfloginuser cflogout cfloop cfmail
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
49 syn keyword cfTagName contained cfmailparam cfmailpart cfmodule cfNTauthenticate cfobject cfobjectcache
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
50 syn keyword cfTagName contained cfoutput cfparam cfpop cfprocessingdirective cfprocparam cfprocresult
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
51 syn keyword cfTagName contained cfproperty cfquery cfqueryparam cfregistry cfreport cfreportparam cfrethrow
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
52 syn keyword cfTagName contained cfreturn cfsavecontent cfschedule cfscript cfsearch cfselect cfset cfsetting
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
53 syn keyword cfTagName contained cfsilent cfslider cfstoredproc cfswitch cftable cftextarea cfthrow cftimer
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
54 syn keyword cfTagName contained cftrace cftransaction cftree cftreeitem cftry cfupdate cfwddx cfxml
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
55
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
56 " Tag parameters.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
57 syn keyword cfArg contained abort accept access accessible action addnewline addtoken addtoken agentname
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
58 syn keyword cfArg contained align appendkey appletsource application applicationtimeout applicationtoken
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
59 syn keyword cfArg contained archive argumentcollection arguments asciiextensionlist attachmentpath
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
60 syn keyword cfArg contained attributecollection attributes attributes autowidth backgroundcolor
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
61 syn keyword cfArg contained backgroundvisible basetag bcc bgcolor bind bindingname blockfactor body bold
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
62 syn keyword cfArg contained border branch cachedafter cachedwithin casesensitive categories category
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
63 syn keyword cfArg contained categorytree cc cfsqltype charset chartheight chartwidth checked class
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
64 syn keyword cfArg contained clientmanagement clientstorage codebase colheaderalign colheaderbold
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
65 syn keyword cfArg contained colheaderfont colheaderfontsize colheaderitalic colheaders colheadertextcolor
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
66 syn keyword cfArg contained collection colorlist colspacing columns completepath component condition
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
67 syn keyword cfArg contained connection contentid context contextbytes contexthighlightbegin
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
68 syn keyword cfArg contained contexthighlightend contextpassages cookiedomain criteria custom1 custom2
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
69 syn keyword cfArg contained custom3 custom4 data dataalign databackgroundcolor datacollection
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
70 syn keyword cfArg contained datalabelstyle datasource date daynames dbname dbserver dbtype dbvarname debug
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
71 syn keyword cfArg contained default delete deletebutton deletefile delimiter delimiters description
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
72 syn keyword cfArg contained destination detail directory disabled display displayname disposition dn domain
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
73 syn keyword cfArg contained enablecab enablecfoutputonly enabled encoded encryption enctype enddate
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
74 syn keyword cfArg contained endrange endrow endtime entry errorcode exception existing expand expires
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
75 syn keyword cfArg contained expireurl expression extendedinfo extends extensions external failifexists
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
76 syn keyword cfArg contained failto file filefield filename filter firstdayofweek firstrowasheaders font
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
77 syn keyword cfArg contained fontbold fontembed fontitalic fontsize foregroundcolor format formfields
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
78 syn keyword cfArg contained formula from generateuniquefilenames getasbinary grid griddataalign gridlines
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
79 syn keyword cfArg contained groovecolor group groupcasesensitive header headeralign headerbold headerfont
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
80 syn keyword cfArg contained headerfontsize headeritalic headerlines headertextcolor height highlighthref
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
81 syn keyword cfArg contained hint href hrefkey hscroll hspace htmltable id idletimeout img imgopen imgstyle
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
82 syn keyword cfArg contained index inline input insert insertbutton interval isolation italic item
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
83 syn keyword cfArg contained itemcolumn key keyonly label labelformat language list listgroups locale
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
84 syn keyword cfArg contained localfile log loginstorage lookandfeel mailerid mailto marginbottom marginleft
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
85 syn keyword cfArg contained marginright marginright margintop markersize markerstyle mask maxlength maxrows
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
86 syn keyword cfArg contained message messagenumber method mimeattach mimetype mode modifytype monthnames
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
87 syn keyword cfArg contained multipart multiple name namecomplict nameconflict namespace new newdirectory
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
88 syn keyword cfArg contained notsupported null numberformat object omit onchange onclick onerror onkeydown
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
89 syn keyword cfArg contained onkeyup onload onmousedown onmouseup onreset onsubmit onvalidate operation
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
90 syn keyword cfArg contained orderby orientation output outputfile overwrite ownerpassword pageencoding
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
91 syn keyword cfArg contained pageheight pagetype pagewidth paintstyle param_1 param_2 param_3 param_4
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
92 syn keyword cfArg contained param_5 parent passive passthrough password path pattern permissions picturebar
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
93 syn keyword cfArg contained pieslicestyle port porttypename prefix preloader preservedata previouscriteria
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
94 syn keyword cfArg contained procedure protocol provider providerdsn proxybypass proxypassword proxyport
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
95 syn keyword cfArg contained proxyserver proxyuser publish query queryasroot queryposition range rebind
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
96 syn keyword cfArg contained recurse redirect referral refreshlabel remotefile replyto report requesttimeout
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
97 syn keyword cfArg contained required reset resolveurl result resultset retrycount returnasbinary returncode
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
98 syn keyword cfArg contained returntype returnvariable roles rowheaderalign rowheaderbold rowheaderfont
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
99 syn keyword cfArg contained rowheaderfontsize rowheaderitalic rowheaders rowheadertextcolor rowheaderwidth
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
100 syn keyword cfArg contained rowheight scale scalefrom scaleto scope scriptprotect scriptsrc secure
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
101 syn keyword cfArg contained securitycontext select selectcolor selected selecteddate selectedindex
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
102 syn keyword cfArg contained selectmode separator seriescolor serieslabel seriesplacement server serviceport
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
103 syn keyword cfArg contained serviceportname sessionmanagement sessiontimeout setclientcookies setcookie
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
104 syn keyword cfArg contained setdomaincookies show3d showborder showdebugoutput showerror showlegend
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
105 syn keyword cfArg contained showmarkers showxgridlines showygridlines size skin sort sortascendingbutton
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
106 syn keyword cfArg contained sortcontrol sortdescendingbutton sortxaxis source spoolenable sql src start
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
107 syn keyword cfArg contained startdate startrange startrow starttime status statuscode statustext step
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
108 syn keyword cfArg contained stoponerror style subject suggestions suppresswhitespace tablename tableowner
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
109 syn keyword cfArg contained tablequalifier taglib target task template text textcolor textqualifier
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
110 syn keyword cfArg contained thread throwonerror throwonfailure throwontimeout time timeout timespan tipbgcolor tipstyle
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
111 syn keyword cfArg contained title to tooltip top toplevelvariable transfermode type uid unit url urlpath
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
112 syn keyword cfArg contained useragent username userpassword usetimezoneinfo validate validateat value
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
113 syn keyword cfArg contained valuecolumn values valuesdelimiter valuesdisplay var variable vertical visible
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
114 syn keyword cfArg contained vscroll vspace webservice width wmode wraptext wsdlfile xaxistitle xaxistype
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
115 syn keyword cfArg contained xoffset yaxistitle yaxistype yoffset
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
116
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
117 " ColdFusion Functions.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
118 syn keyword cfFunctionName contained Abs GetFunctionList Max ACos GetGatewayHelper Mid AddSOAPRequestHeader
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
119 syn keyword cfFunctionName contained GetHttpRequestData Min AddSOAPResponseHeader GetHttpTimeString Minute
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
120 syn keyword cfFunctionName contained ArrayAppend GetLocale Month ArrayAvg GetLocaleDisplayName MonthAsString
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
121 syn keyword cfFunctionName contained ArrayClear GetMetaData Now ArrayDeleteAt GetMetricData NumberFormat
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
122 syn keyword cfFunctionName contained ArrayInsertAt GetPageContext ParagraphFormat ArrayIsEmpty GetProfileSections
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
123 syn keyword cfFunctionName contained ParseDateTime ArrayLen GetProfileString Pi ArrayMax GetSOAPRequest
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
124 syn keyword cfFunctionName contained PreserveSingleQuotes ArrayMin GetSOAPRequestHeader Quarter ArrayNew
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
125 syn keyword cfFunctionName contained GetSOAPResponse QueryAddColumn ArrayPrepend GetSOAPResponseHeader QueryAddRow
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
126 syn keyword cfFunctionName contained ArrayResize GetTempDirectory QueryNew ArraySet GetTempFile QuerySetCell
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
127 syn keyword cfFunctionName contained ArraySort GetTickCount QuotedValueList ArraySum GetTimeZoneInfo Rand ArraySwap
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
128 syn keyword cfFunctionName contained GetToken Randomize ArrayToList Hash RandRange Asc Hour REFind ASin
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
129 syn keyword cfFunctionName contained HTMLCodeFormat REFindNoCase Atn HTMLEditFormat ReleaseComObject BinaryDecode
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
130 syn keyword cfFunctionName contained IIf RemoveChars BinaryEncode IncrementValue RepeatString BitAnd InputBaseN
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
131 syn keyword cfFunctionName contained Replace BitMaskClear Insert ReplaceList BitMaskRead Int ReplaceNoCase
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
132 syn keyword cfFunctionName contained BitMaskSet IsArray REReplace BitNot IsBinary REReplaceNoCase BitOr IsBoolean
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
133 syn keyword cfFunctionName contained Reverse BitSHLN IsCustomFunction Right BitSHRN IsDate RJustify BitXor
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
134 syn keyword cfFunctionName contained IsDebugMode Round Ceiling IsDefined RTrim CharsetDecode IsLeapYear Second
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
135 syn keyword cfFunctionName contained CharsetEncode IsNumeric SendGatewayMessage Chr IsNumericDate SetEncoding
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
136 syn keyword cfFunctionName contained CJustify IsObject SetLocale Compare IsQuery SetProfileString CompareNoCase
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
137 syn keyword cfFunctionName contained IsSimpleValue SetVariable Cos IsSOAPRequest Sgn CreateDate IsStruct Sin
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
138 syn keyword cfFunctionName contained CreateDateTime IsUserInRole SpanExcluding CreateObject IsValid SpanIncluding
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
139 syn keyword cfFunctionName contained CreateODBCDate IsWDDX Sqr CreateODBCDateTime IsXML StripCR CreateODBCTime
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
140 syn keyword cfFunctionName contained IsXmlAttribute StructAppend CreateTime IsXmlDoc StructClear CreateTimeSpan
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
141 syn keyword cfFunctionName contained IsXmlElem StructCopy CreateUUID IsXmlNode StructCount DateAdd IsXmlRoot
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
142 syn keyword cfFunctionName contained StructDelete DateCompare JavaCast StructFind DateConvert JSStringFormat
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
143 syn keyword cfFunctionName contained StructFindKey DateDiff LCase StructFindValue DateFormat Left StructGet
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
144 syn keyword cfFunctionName contained DatePart Len StructInsert Day ListAppend StructIsEmpty DayOfWeek
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
145 syn keyword cfFunctionName contained ListChangeDelims StructKeyArray DayOfWeekAsString ListContains StructKeyExists
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
146 syn keyword cfFunctionName contained DayOfYear ListContainsNoCase StructKeyList DaysInMonth ListDeleteAt StructNew
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
147 syn keyword cfFunctionName contained DaysInYear ListFind StructSort DE ListFindNoCase StructUpdate DecimalFormat
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
148 syn keyword cfFunctionName contained ListFirst Tan DecrementValue ListGetAt TimeFormat Decrypt ListInsertAt
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
149 syn keyword cfFunctionName contained ToBase64 DeleteClientVariable ListLast ToBinary DirectoryExists ListLen
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
150 syn keyword cfFunctionName contained ToScript DollarFormat ListPrepend ToString Duplicate ListQualify Trim Encrypt
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
151 syn keyword cfFunctionName contained ListRest UCase Evaluate ListSetAt URLDecode Exp ListSort URLEncodedFormat
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
152 syn keyword cfFunctionName contained ExpandPath ListToArray URLSessionFormat FileExists ListValueCount Val Find
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
153 syn keyword cfFunctionName contained ListValueCountNoCase ValueList FindNoCase LJustify Week FindOneOf Log Wrap
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
154 syn keyword cfFunctionName contained FirstDayOfMonth Log10 WriteOutput Fix LSCurrencyFormat XmlChildPos FormatBaseN
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
155 syn keyword cfFunctionName contained LSDateFormat XmlElemNew GetTempDirectory LSEuroCurrencyFormat XmlFormat
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
156 syn keyword cfFunctionName contained GetAuthUser LSIsCurrency XmlGetNodeType GetBaseTagData LSIsDate XmlNew
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
157 syn keyword cfFunctionName contained GetBaseTagList LSIsNumeric XmlParse GetBaseTemplatePath LSNumberFormat
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
158 syn keyword cfFunctionName contained XmlSearch GetClientVariablesList LSParseCurrency XmlTransform
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
159 syn keyword cfFunctionName contained GetCurrentTemplatePath LSParseDateTime XmlValidate GetDirectoryFromPath
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
160 syn keyword cfFunctionName contained LSParseEuroCurrency Year GetEncoding LSParseNumber YesNoFormat GetException
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
161 syn keyword cfFunctionName contained LSTimeFormat GetFileFromPath LTrim
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
162
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
163 syn cluster htmlTagNameCluster add=cfTagName
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
164 syn cluster htmlArgCluster add=cfArg,cfHashRegion,cfScope
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
165 syn cluster htmlPreproc add=cfHashRegion
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
166
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
167 syn cluster cfExpressionCluster contains=cfFunctionName,cfScope,@cfOperatorCluster,cfScriptStringD,cfScriptStringS,cfScriptNumber,cfBool
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
168
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
169 " Evaluation; skip strings ( this helps with cases like nested IIf() )
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
170 syn region cfHashRegion start=+#+ skip=+"[^"]*"\|'[^']*'+ end=+#+ contains=@cfExpressionCluster,cfScriptParenError
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
171
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
172 " <cfset>, <cfif>, <cfelseif>, <cfreturn> are analogous to hashmarks (implicit evaluation) and has 'var'
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
173 syn region cfSetRegion start="<cfset " start="<cfreturn " start="<cfelseif " start="<cfif " end='>' keepend contains=@cfExpressionCluster,cfSetLHSRegion,cfSetTagEnd,cfScriptType
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
174 syn region cfSetLHSRegion contained start="<cfreturn" start="<cfelseif" start="<cfif" start="<cfset" end=" " keepend contains=cfTagName,htmlTag
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
175 syn match cfSetTagEnd contained '>'
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
176
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
177 " CF comments: similar to SGML comments
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
178 syn region cfComment start='<!---' end='--->' keepend contains=cfCommentTodo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
179 syn keyword cfCommentTodo contained TODO FIXME XXX TBD WTF
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
180
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
181 " CFscript
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
182 syn match cfScriptLineComment contained "\/\/.*$" contains=cfCommentTodo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
183 syn region cfScriptComment contained start="/\*" end="\*/" contains=cfCommentTodo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
184 " in CF, quotes are escaped by doubling
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
185 syn region cfScriptStringD contained start=+"+ skip=+\\\\\|""+ end=+"+ extend contains=@htmlPreproc,cfHashRegion
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
186 syn region cfScriptStringS contained start=+'+ skip=+\\\\\|''+ end=+'+ extend contains=@htmlPreproc,cfHashRegion
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
187 syn match cfScriptNumber contained "-\=\<\d\+L\=\>"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
188 syn keyword cfScriptConditional contained if else
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
189 syn keyword cfScriptRepeat contained while for in
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
190 syn keyword cfScriptBranch contained break switch case try catch continue
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
191 syn keyword cfScriptFunction contained function
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
192 syn keyword cfScriptType contained var
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
193 syn match cfScriptBraces contained "[{}]"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
194 syn keyword cfScriptStatement contained return
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
195
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
196 syn cluster cfScriptCluster contains=cfScriptParen,cfScriptLineComment,cfScriptComment,cfScriptStringD,cfScriptStringS,cfScriptFunction,cfScriptNumber,cfScriptRegexpString,cfScriptBoolean,cfScriptBraces,cfHashRegion,cfFunctionName,cfScope,@cfOperatorCluster,cfScriptConditional,cfScriptRepeat,cfScriptBranch,cfScriptType,@cfExpressionCluster,cfScriptStatement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
197
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
198 " Errors caused by wrong parenthesis; skip strings
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
199 syn region cfScriptParen contained transparent skip=+"[^"]*"\|'[^']*'+ start=+(+ end=+)+ contains=@cfScriptCluster
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
200 syn match cfScrParenError contained +)+
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
201
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
202 syn region cfscriptBlock matchgroup=NONE start="<cfscript>" end="<\/cfscript>"me=s-1 keepend contains=@cfScriptCluster,cfscriptTag,cfScrParenError
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
203 syn region cfscriptTag contained start='<cfscript' end='>' keepend contains=cfTagName,htmlTag
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
204
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
205 " Define the default highlighting.
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
206 if version >= 508 || !exists("did_cf_syn_inits")
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
207 if version < 508
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
208 let did_cf_syn_inits = 1
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
209 command -nargs=+ HiLink hi link <args>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
210 else
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
211 command -nargs=+ HiLink hi def link <args>
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
212 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
213
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
214 HiLink cfTagName Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
215 HiLink cfArg Type
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
216 HiLink cfFunctionName Function
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
217 HiLink cfHashRegion PreProc
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
218 HiLink cfComment Comment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
219 HiLink cfCommentTodo Todo
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
220 HiLink cfOperator Operator
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
221 HiLink cfOperatorMatch Operator
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
222 HiLink cfScope Title
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
223 HiLink cfBool Constant
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
224
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
225 HiLink cfscriptBlock Special
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
226 HiLink cfscriptTag htmlTag
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
227 HiLink cfSetRegion PreProc
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
228 HiLink cfSetLHSRegion htmlTag
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
229 HiLink cfSetTagEnd htmlTag
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
230
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
231 HiLink cfScriptLineComment Comment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
232 HiLink cfScriptComment Comment
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
233 HiLink cfScriptStringS String
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
234 HiLink cfScriptStringD String
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
235 HiLink cfScriptNumber cfScriptValue
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
236 HiLink cfScriptConditional Conditional
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
237 HiLink cfScriptRepeat Repeat
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
238 HiLink cfScriptBranch Conditional
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
239 HiLink cfScriptType Type
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
240 HiLink cfScriptStatement Statement
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
241 HiLink cfScriptBraces Function
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
242 HiLink cfScriptFunction Function
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
243 HiLink cfScriptError Error
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
244 HiLink cfScrParenError cfScriptError
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
245
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
246 delcommand HiLink
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
247 endif
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
248
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
249 let b:current_syntax = "cf"
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
250
76efa0be13f1 Initial revision
atsuki
parents:
diff changeset
251 " vim: ts=8 sw=2