7
|
1 " Vim syntax file
|
|
2 " Language: Cold Fusion
|
|
3 " Maintainer: Jeff Lanzarotta (jefflanzarotta@yahoo.com)
|
|
4 " URL: http://lanzarotta.tripod.com/vim/syntax/cf.vim.zip
|
|
5 " Last Change: October 15, 2001
|
|
6 " Usage: Since Cold Fusion has its own version of html comments,
|
|
7 " make sure that you put
|
|
8 " 'let html_wrong_comments=1' in your _vimrc file.
|
|
9
|
|
10 " For version 5.x, clear all syntax items.
|
|
11 " For version 6.x, quit when a syntax file was already loaded.
|
|
12 if version < 600
|
|
13 syntax clear
|
|
14 elseif exists("b:current_syntax")
|
|
15 finish
|
|
16 endif
|
|
17
|
|
18 " Use all the stuff from the original html syntax file.
|
|
19 if version < 600
|
|
20 source <sfile>:p:h/html.vim
|
|
21 else
|
|
22 runtime! syntax/html.vim
|
|
23 endif
|
|
24
|
|
25 " Tag names.
|
|
26 syn keyword cfTagName contained cfabort cfapplet cfapplication cfassociate
|
|
27 syn keyword cfTagName contained cfauthenticate cfbreak cfcache cfcol
|
|
28 syn keyword cfTagName contained cfcollection cfcontent cfcookie cfdirectory
|
|
29 syn keyword cfTagName contained cferror cfexit cffile cfform cfftp cfgrid
|
|
30 syn keyword cfTagName contained cfgridcolumn cfgridrow cfgridupdate cfheader
|
|
31 syn keyword cfTagName contained cfhtmlhead cfhttp cfhttpparam
|
|
32 syn keyword cfTagName contained cfif cfelseif cfelse
|
|
33 syn keyword cfTagName contained cfinclude cfindex cfinput cfinsert
|
|
34 syn keyword cfTagName contained cfldap cflocation cflock cfloop cfmail
|
|
35 syn keyword cfTagName contained cfmodule cfobject cfoutput cfparam cfpop
|
|
36 syn keyword cfTagName contained cfprocparam cfprocresult cfquery cfregistry
|
|
37 syn keyword cfTagName contained cfreport cfschedule cfscript cfsearch cfselect
|
|
38 syn keyword cfTagName contained cfset cfsetting cfslider cfstoredproc
|
|
39 syn keyword cfTagName contained cfswitch cfcase cfdefaultcase
|
|
40 syn keyword cfTagName contained cftable cftextinput cfthrow cftransaction
|
|
41 syn keyword cfTagName contained cftree cftreeitem
|
|
42 syn keyword cfTagName contained cftry cfcatch
|
|
43 syn keyword cfTagName contained cfupdate cfwddx
|
|
44
|
|
45 " Legal arguments.
|
|
46 syn keyword cfArg contained accept action addnewline addtoken agentname align
|
|
47 syn keyword cfArg contained appendkey applicationtimeout attachmentpath
|
|
48 syn keyword cfArg contained attributecollection attributes basetag bgcolor
|
|
49 syn keyword cfArg contained blockfactor body bold border branch cachedafter
|
|
50 syn keyword cfArg contained cachedwithin cc cfsqltype checked class clientmanagement
|
|
51 syn keyword cfArg contained clientstorage colheaderalign colheaderbold colheaderfont
|
|
52 syn keyword cfArg contained colheaderfontsize colheaderitalic colheaders collection
|
|
53 syn keyword cfArg contained colspacing columns completepath connection context
|
|
54 syn keyword cfArg contained criteria custom1 custom2 data dataalign datacollection
|
|
55 syn keyword cfArg contained datasource dbname dbserver dbtype dbvarname debug default
|
|
56 syn keyword cfArg contained delete deletebutton deletefile delimiter destination detail
|
|
57 syn keyword cfArg contained directory display dn domain enablecab enablecfoutputonly
|
|
58 syn keyword cfArg contained enctype enddate endtime entry errorcode expand expires
|
|
59 syn keyword cfArg contained expireurl expression extendedinfo extensions external
|
|
60 syn keyword cfArg contained file filefield filter font fontsize formfields formula
|
|
61 syn keyword cfArg contained from grid griddataalign gridlines groovecolor group header
|
|
62 syn keyword cfArg contained headeralign headerbold headerfont headerfontsize headeritalic
|
|
63 syn keyword cfArg contained headerlines height highlighthref href hrefkey hscroll hspace
|
|
64 syn keyword cfArg contained htmltable img imgopen imgstyle index input insert insertbutton
|
|
65 syn keyword cfArg contained interval isolation italic key keyonly label language mailerid
|
|
66 syn keyword cfArg contained mailto maxlength maxrows message messagenumber method
|
|
67 syn keyword cfArg contained mimeattach mode multiple name namecomplict newdirectory
|
|
68 syn keyword cfArg contained notsupported null numberformat onerror onsubmit onvalidate
|
|
69 syn keyword cfArg contained operation orderby output parrent passthrough password path
|
|
70 syn keyword cfArg contained picturebar port procedure protocol provider providerdsn
|
|
71 syn keyword cfArg contained proxybypass proxyserver publish query queryasroot range
|
|
72 syn keyword cfArg contained recurse refreshlabel report requesttimeout required reset
|
|
73 syn keyword cfArg contained resoleurl resultset retrycount returncode rowheaderalign
|
|
74 syn keyword cfArg contained rowheaderbold rowheaderfont rowheaderfontsize rowheaderitalic
|
|
75 syn keyword cfArg contained rowheaders rowheaderwidth rowheight scale scope secure
|
|
76 syn keyword cfArg contained securitycontext select selectcolor selected selectmode server
|
|
77 syn keyword cfArg contained sessionmanagement sessiontimeout setclientcookies setcookie
|
|
78 syn keyword cfArg contained showdebugoutput showerror size sort sortascendingbutton
|
|
79 syn keyword cfArg contained sortdescendingbutton source sql start startdate startrow starttime
|
|
80 syn keyword cfArg contained step stoponerror subject tablename tableowner tablequalifier
|
|
81 syn keyword cfArg contained target task template text textcolor textqualifier
|
|
82 syn keyword cfArg contained throwonfailure throwontimeout timeout title to toplevelvariable
|
|
83 syn keyword cfArg contained type url urlpath username usetimezoneinfo validate value
|
|
84 syn keyword cfArg contained variable vscroll vspace width
|
|
85
|
|
86 " Cold Fusion Functions.
|
|
87 syn keyword cfFunctionName contained Abs ArrayAppend ArrayAvg ArrayClear ArrayDeleteAt
|
|
88 syn keyword cfFunctionName contained ArrayInsertAt ArrayIsEmpty ArrayLen ArrayMax
|
|
89 syn keyword cfFunctionName contained ArrayMin ArrayNew ArrayPrepend ArrayResize ArraySet
|
|
90 syn keyword cfFunctionName contained ArraySort ArraySum ArraySwap ArrayToList Asc Atn
|
|
91 syn keyword cfFunctionName contained BitAnd BitMaskClear BitMaskRead BitMaskSet BitNot
|
|
92 syn keyword cfFunctionName contained BitOr BitSHLN BitSHRN BitXor CJustify Ceiling Chr
|
|
93 syn keyword cfFunctionName contained Compare CompareNoCase Cos CreateDate CreateDateTime
|
|
94 syn keyword cfFunctionName contained CreateODBCDate CreateODBCDateTime CreateODBCTime
|
|
95 syn keyword cfFunctionName contained CreateTime CreateTimeSpan DE DateAdd DateCompare DateDiff
|
|
96 syn keyword cfFunctionName contained DateFormat DatePart Day DayOfWeek DayOfWeekAsString
|
|
97 syn keyword cfFunctionName contained DayOfYear DaysInMonth DaysInYear DecimalFormat DecrementValue
|
|
98 syn keyword cfFunctionName contained Decrypt DeleteClientVariable DirectoryExists DollarFormat
|
|
99 syn keyword cfFunctionName contained Encrypt Evaluate Exp ExpandPath FileExists Find FindNoCase
|
|
100 syn keyword cfFunctionName contained FindOneOf FirstDayOfMonth Fix FormatBaseN GetBaseTagData
|
|
101 syn keyword cfFunctionName contained GetBaseTagList GetClientVariablesList GetDirectoryFromPath
|
|
102 syn keyword cfFunctionName contained GetFileFromPath GetLocale GetTempDirectory GetTempFile
|
|
103 syn keyword cfFunctionName contained GetTemplatePath GetTickCount GetToken HTMLCodeFormat
|
|
104 syn keyword cfFunctionName contained HTMLEditFormat Hour IIf IncrementValue InputBaseN Insert
|
|
105 syn keyword cfFunctionName contained Int IsArray IsAuthenticated IsAuthorized IsBoolean IsDate
|
|
106 syn keyword cfFunctionName contained IsDebugMode IsDefined IsLeapYear IsNumeric IsNumericDate
|
|
107 syn keyword cfFunctionName contained IsQuery IsSimpleValue IsStruct LCase LJustify LSCurrencyFormat
|
|
108 syn keyword cfFunctionName contained LSDateFormat LSIsCurrency LSIsDate LSIsNumeric LSNumberFormat
|
|
109 syn keyword cfFunctionName contained LSParseCurrency LSParseDateTime LSParseNumber LSTimeFormat
|
|
110 syn keyword cfFunctionName contained LTrim Left Len ListAppend ListChangeDelims ListContains
|
|
111 syn keyword cfFunctionName contained ListContainsNoCase ListDeleteAt ListFind ListFindNoCase ListFirst
|
|
112 syn keyword cfFunctionName contained ListGetAt ListInsertAt ListLast ListLen ListPrepend ListRest
|
|
113 syn keyword cfFunctionName contained ListSetAt ListToArray Log Log10 Max Mid Min Minute Month
|
|
114 syn keyword cfFunctionName contained MonthAsString Now NumberFormat ParagraphFormat ParameterExists
|
|
115 syn keyword cfFunctionName contained ParseDateTime Pi PreserveSingleQuotes Quarter QueryAddRow
|
|
116 syn keyword cfFunctionName contained QueryNew QuerySetCell QuotedValueList REFind REFindNoCase
|
|
117 syn keyword cfFunctionName contained REReplace REReplaceNoCase RJustify RTrim Rand RandRange
|
|
118 syn keyword cfFunctionName contained Randomize RemoveChars RepeatString Replace ReplaceList
|
|
119 syn keyword cfFunctionName contained ReplaceNoCase Reverse Right Round Second SetLocale SetVariable
|
|
120 syn keyword cfFunctionName contained Sgn Sin SpanExcluding SpanIncluding Sqr StripCR StructClear
|
|
121 syn keyword cfFunctionName contained StructCopy StructCount StructDelete StructFind StructInsert
|
|
122 syn keyword cfFunctionName contained StructIsEmpty StructKeyExists StructNew StructUpdate Tan
|
|
123 syn keyword cfFunctionName contained TimeFormat Trim UCase URLEncodedFormat Val ValueList Week
|
|
124 syn keyword cfFunctionName contained WriteOutput Year YesNoFormat
|
|
125
|
|
126 syn cluster htmlTagNameCluster add=cfTagName
|
|
127 syn cluster htmlArgCluster add=cfArg,cfFunctionName
|
|
128
|
|
129 syn region cfFunctionRegion start='#' end='#' contains=cfFunctionName
|
|
130
|
|
131 " Define the default highlighting.
|
|
132 " For version 5.x and earlier, only when not done already.
|
|
133 " For version 5.8 and later, only when and item doesn't have highlighting yet.
|
|
134 if version >= 508 || !exists("did_cf_syn_inits")
|
|
135 if version < 508
|
|
136 let did_cf_syn_inits = 1
|
|
137 command -nargs=+ HiLink hi link <args>
|
|
138 else
|
|
139 command -nargs=+ HiLink hi def link <args>
|
|
140 endif
|
|
141
|
|
142 HiLink cfTagName Statement
|
|
143 HiLink cfArg Type
|
|
144 HiLink cfFunctionName Function
|
|
145
|
|
146 delcommand HiLink
|
|
147 endif
|
|
148
|
|
149 let b:current_syntax = "cf"
|
|
150
|
|
151 " vim: ts=8 sw=2
|