neovim

Neovim text editor
git clone https://git.dasho.dev/neovim.git
Log | Files | Refs | README

cf.vim (18644B)


      1 " Vim syntax file
      2 "
      3 " Language:     CFML (ColdFusion)
      4 " Author:       Ernst M. van der Linden <ernst.vanderlinden@ernestoz.com>
      5 " License:      The MIT License (MIT)
      6 "
      7 " Maintainer:   Ernst M. van der Linden <ernst.vanderlinden@ernestoz.com>
      8 " URL:          https://github.com/ernstvanderlinden/vim-coldfusion
      9 " Last Change:  2017 Nov 28
     10 "
     11 " Filenames:    *.cfc *.cfm
     12 
     13 " Quit when a syntax file was already loaded.
     14 if exists("b:current_syntax")
     15  finish
     16 endif
     17 
     18 " Using line continuation here.
     19 let s:cpo_save=&cpo
     20 set cpo-=C
     21 
     22 sy sync fromstart
     23 " 20171126: disabled as we have fast computers now.
     24 "sy sync maxlines=2000
     25 sy case ignore
     26 
     27 " INCLUDES {{{
     28 sy include @sqlSyntax $VIMRUNTIME/syntax/sql.vim
     29 " 20161010: Disabled include html highlighting as it contains huge keywords
     30 " regex, so it will have impact on performance.  Use own simple SGML tag
     31 " coloring instead.
     32 "runtime! syntax/html.vim
     33 " / INCLUDES }}}
     34 
     35 " NUMBER {{{
     36 sy match cfmlNumber
     37    \ "\v<\d+>"
     38 " / NUMBER }}}
     39 
     40 " EQUAL SIGN {{{
     41 sy match cfmlEqualSign
     42    \ "\v\="
     43 " / EQUAL SIGN }}}
     44 
     45 " BOOLEAN {{{
     46 sy match cfmlBoolean
     47    \ "\v<(true|false)>"
     48 " / BOOLEAN }}}
     49 
     50 " HASH SURROUNDED {{{
     51 sy region cfmlHashSurround
     52  \ keepend
     53  \ oneline
     54  \ start="#"
     55  \ end="#"
     56  \ skip="##"
     57    \ contains=
     58      \@cfmlOperator,
     59      \@cfmlPunctuation,
     60      \cfmlBoolean,
     61      \cfmlCoreKeyword,
     62      \cfmlCoreScope,
     63      \cfmlCustomKeyword,
     64      \cfmlCustomScope,
     65      \cfmlEqualSign,
     66      \cfmlFunctionName,
     67      \cfmlNumber
     68 " / HASH SURROUNDED }}}
     69 
     70 " OPERATOR {{{
     71 
     72 " OPERATOR - ARITHMETIC {{{
     73 " +7 -7
     74 " ++i --i
     75 " i++ i--
     76 " + - * / %
     77 " += -= *= /= %=
     78 " ^ mod
     79 sy match cfmlArithmeticOperator
     80  \ "\v
     81  \(\+|-)\ze\d
     82  \|(\+\+|--)\ze\w
     83  \|\w\zs(\+\+|--)
     84  \|(\s(
     85  \(\+|-|\*|\/|\%){1}\={,1}
     86  \|\^
     87  \|mod
     88  \)\s)
     89  \"
     90 " / OPERATOR - ARITHMETIC }}}
     91 
     92 " OPERATOR - BOOLEAN {{{
     93 " not and or xor eqv imp
     94 " ! && ||
     95 sy match cfmlBooleanOperator
     96  \ "\v\s
     97  \(not|and|or|xor|eqv|imp
     98  \|\!|\&\&|\|\|
     99  \)(\s|\))
    100  \|\s\!\ze\w
    101  \"
    102 " / OPERATOR - BOOLEAN }}}
    103 
    104 " OPERATOR - DECISION {{{
    105 "is|equal|eq
    106 "is not|not equal|neq
    107 "contains|does not contain
    108 "greater than|gt
    109 "less than|lt
    110 "greater than or equal to|gte|ge
    111 "less than or equal to|lte|le
    112 "==|!=|>|<|>=|<=
    113 sy match cfmlDecisionOperator
    114  \ "\v\s
    115  \(is|equal|eq
    116  \|is not|not equal|neq
    117  \|contains|does not contain
    118  \|greater than|gt
    119  \|less than|lt
    120  \|greater than or equal to|gte|ge
    121  \|less than or equal to|lte|le
    122  \|(!|\<|\>|\=){1}\=
    123  \|\<
    124  \|\>
    125  \)\s"
    126 " / OPERATOR - DECISION }}}
    127 
    128 " OPERATOR - STRING {{{
    129 " &
    130 " &=
    131 sy match cfmlStringOperator
    132    \ "\v\s\&\={,1}\s"
    133 " / OPERATOR - STRING }}}
    134 
    135 " OPERATOR - TERNARY {{{
    136 " ? :
    137 sy match cfmlTernaryOperator
    138  \ "\v\s
    139  \\?|\:
    140  \\s"
    141 " / OPERATOR - TERNARY }}}
    142 
    143 sy cluster cfmlOperator
    144  \ contains=
    145    \cfmlArithmeticOperator,
    146    \cfmlBooleanOperator,
    147    \cfmlDecisionOperator,
    148    \cfmlStringOperator,
    149    \cfmlTernaryOperator
    150 " / OPERATOR }}}
    151 
    152 " PARENTHESIS {{{
    153 sy cluster cfmlParenthesisRegionContains
    154  \ contains=
    155    \@cfmlAttribute,
    156    \@cfmlComment,
    157    \@cfmlFlowStatement,
    158    \@cfmlOperator,
    159    \@cfmlPunctuation,
    160    \cfmlBoolean,
    161    \cfmlBrace,
    162    \cfmlCoreKeyword,
    163    \cfmlCoreScope,
    164    \cfmlCustomKeyword,
    165    \cfmlCustomScope,
    166    \cfmlEqualSign,
    167    \cfmlFunctionName,
    168    \cfmlNumber,
    169    \cfmlStorageKeyword,
    170    \cfmlStorageType
    171 
    172 sy region cfmlParenthesisRegion1
    173  \ extend
    174  \ matchgroup=cfmlParenthesis1
    175  \ transparent
    176  \ start=/(/
    177  \ end=/)/
    178  \ contains=
    179    \cfmlParenthesisRegion2,
    180    \@cfmlParenthesisRegionContains
    181 sy region cfmlParenthesisRegion2
    182  \ matchgroup=cfmlParenthesis2
    183  \ transparent
    184  \ start=/(/
    185  \ end=/)/
    186  \ contains=
    187    \cfmlParenthesisRegion3,
    188    \@cfmlParenthesisRegionContains
    189 sy region cfmlParenthesisRegion3
    190  \ matchgroup=cfmlParenthesis3
    191  \ transparent
    192  \ start=/(/
    193  \ end=/)/
    194  \ contains=
    195    \cfmlParenthesisRegion1,
    196    \@cfmlParenthesisRegionContains
    197 sy cluster cfmlParenthesisRegion
    198  \ contains=
    199    \cfmlParenthesisRegion1,
    200    \cfmlParenthesisRegion2,
    201    \cfmlParenthesisRegion3
    202 " / PARENTHESIS }}}
    203 
    204 " BRACE {{{
    205 sy match cfmlBrace
    206    \ "{\|}"
    207 
    208 sy region cfmlBraceRegion
    209  \ extend
    210  \ fold
    211  \ keepend
    212  \ transparent
    213  \ start="{"
    214  \ end="}"
    215 " / BRACE }}}
    216 
    217 " PUNCTUATION {{{
    218 
    219 " PUNCTUATION - BRACKET {{{
    220 sy match cfmlBracket
    221  \ "\(\[\|\]\)"
    222  \ contained
    223 " / PUNCTUATION - BRACKET }}}
    224 
    225 " PUNCTUATION - CHAR {{{
    226 sy match cfmlComma ","
    227 sy match cfmlDot "\."
    228 sy match cfmlSemiColon ";"
    229 
    230 " / PUNCTUATION - CHAR }}}
    231 
    232 " PUNCTUATION - QUOTE {{{
    233 sy region cfmlSingleQuotedValue
    234  \ matchgroup=cfmlSingleQuote
    235  \ start=/'/
    236  \ skip=/''/
    237  \ end=/'/
    238  \ contains=
    239    \cfmlHashSurround
    240 
    241 sy region cfmlDoubleQuotedValue
    242  \ matchgroup=cfmlDoubleQuote
    243  \ start=/"/
    244  \ skip=/""/
    245  \ end=/"/
    246  \ contains=
    247    \cfmlHashSurround
    248 
    249 sy cluster cfmlQuotedValue
    250  \ contains=
    251    \cfmlDoubleQuotedValue,
    252    \cfmlSingleQuotedValue
    253 
    254 sy cluster cfmlQuote
    255  \ contains=
    256    \cfmlDoubleQuote,
    257    \cfmlSingleQuote
    258 " / PUNCTUATION - QUOTE }}}
    259 
    260 sy cluster cfmlPunctuation
    261  \ contains=
    262    \@cfmlQuote,
    263    \@cfmlQuotedValue,
    264    \cfmlBracket,
    265    \cfmlComma,
    266    \cfmlDot,
    267    \cfmlSemiColon
    268 
    269 " / PUNCTUATION }}}
    270 
    271 " TAG START AND END {{{
    272 " tag start
    273 " <cf...>
    274 " s^^   e
    275 sy region cfmlTagStart
    276  \ keepend
    277  \ transparent
    278  \ start="\c<cf_*"
    279  \ end=">"
    280 \ contains=
    281  \@cfmlAttribute,
    282  \@cfmlComment,
    283  \@cfmlOperator,
    284  \@cfmlParenthesisRegion,
    285  \@cfmlPunctuation,
    286  \@cfmlQuote,
    287  \@cfmlQuotedValue,
    288  \cfmlAttrEqualSign,
    289  \cfmlBoolean,
    290  \cfmlBrace,
    291  \cfmlCoreKeyword,
    292  \cfmlCoreScope,
    293  \cfmlCustomKeyword,
    294  \cfmlCustomScope,
    295  \cfmlEqualSign,
    296  \cfmlFunctionName,
    297  \cfmlNumber,
    298  \cfmlStorageKeyword,
    299  \cfmlStorageType,
    300  \cfmlTagBracket,
    301  \cfmlTagName
    302 
    303 " tag end
    304 " </cf...>
    305 " s^^^   e
    306 sy match cfmlTagEnd
    307  \ transparent
    308  \ "\c</cf_*[^>]*>"
    309  \ contains=
    310    \cfmlTagBracket,
    311    \cfmlTagName
    312 
    313 " tag bracket
    314 " </...>
    315 " ^^   ^
    316 sy match cfmlTagBracket
    317  \ contained
    318  \ "\(<\|>\|\/\)"
    319 
    320 " tag name
    321 " <cf...>
    322 "  s^^^e
    323 sy match cfmlTagName
    324  \ contained
    325  \ "\v<\/*\zs\ccf\w*"
    326 " / TAG START AND END }}}
    327 
    328 " ATTRIBUTE NAME AND VALUE {{{
    329 sy match cfmlAttrName
    330  \ contained
    331  \ "\v(var\s)@<!\w+\ze\s*\=([^\=])+"
    332 
    333 sy match cfmlAttrValue
    334  \ contained
    335  \ "\v(\=\"*)\zs\s*\w*"
    336 
    337 sy match cfmlAttrEqualSign
    338  \ contained
    339  \ "\v\="
    340 
    341 sy cluster cfmlAttribute
    342 \ contains=
    343  \@cfmlQuotedValue,
    344  \cfmlAttrEqualSign,
    345  \cfmlAttrName,
    346  \cfmlAttrValue,
    347  \cfmlCoreKeyword,
    348  \cfmlCoreScope
    349 " / ATTRIBUTE NAME AND VALUE }}}
    350 
    351 " TAG REGION AND FOLDING {{{
    352 
    353 " CFCOMPONENT REGION AND FOLD {{{
    354 " <cfcomponent
    355 " s^^^^^^^^^^^
    356 " </cfcomponent>
    357 " ^^^^^^^^^^^^^e
    358 sy region cfmlComponentTagRegion
    359  \ fold
    360  \ keepend
    361  \ transparent
    362  \ start="\c<cfcomponent"
    363  \ end="\c</cfcomponent>"
    364 
    365 " / CFCOMPONENT REGION AND FOLD }}}
    366 
    367 " CFFUNCTION REGION AND FOLD {{{
    368 " <cffunction
    369 " s^^^^^^^^^^
    370 " </cffunction>
    371 " ^^^^^^^^^^^^e
    372 sy region cfmlFunctionTagRegion
    373  \ fold
    374  \ keepend
    375  \ transparent
    376  \ start="\c<cffunction"
    377  \ end="\c</cffunction>"
    378 " / CFFUNCTION REGION AND FOLD }}}
    379 
    380 " CFIF REGION AND FOLD {{{
    381 " <cfif
    382 " s^^^^
    383 " </cfif>
    384 " ^^^^^^e
    385 sy region cfmlIfTagRegion
    386  \ fold
    387  \ keepend
    388  \ transparent
    389  \ start="\c<cfif"
    390  \ end="\c</cfif>"
    391 " / CFIF REGION AND FOLD }}}
    392 
    393 " CFLOOP REGION AND FOLD {{{
    394 " <cfloop
    395 " s^^^^^^
    396 " </cfloop>
    397 " ^^^^^^^^e
    398 sy region cfmlLoopTagRegion
    399  \ fold
    400  \ keepend
    401  \ transparent
    402  \ start="\c<cfloop"
    403  \ end="\c</cfloop>"
    404 " / CFLOOP REGION AND FOLD }}}
    405 
    406 " CFOUTPUT REGION AND FOLD {{{
    407 " <cfoutput
    408 " s^^^^^^^^
    409 " </cfoutput>
    410 " ^^^^^^^^^^e
    411 sy region cfmlOutputTagRegion
    412  \ fold
    413  \ keepend
    414  \ transparent
    415  \ start="\c<cfoutput"
    416  \ end="\c</cfoutput>"
    417 " / CFOUTPUT REGION AND FOLD }}}
    418 
    419 " CFQUERY REGION AND FOLD {{{
    420 " <cfquery
    421 " s^^^^^^^
    422 " </cfquery>
    423 " ^^^^^^^^^e
    424        "\@cfmlSqlStatement,
    425 sy region cfmlQueryTagRegion
    426  \ fold
    427  \ keepend
    428  \ transparent
    429  \ start="\c<cfquery"
    430  \ end="\c</cfquery>"
    431  \ contains=
    432    \@cfmlSqlStatement,
    433    \cfmlTagStart,
    434    \cfmlTagEnd,
    435    \cfmlTagComment
    436 " / CFQUERY REGION AND FOLD }}}
    437 
    438 " SAVECONTENT REGION AND FOLD {{{
    439 " <savecontent
    440 " s^^^^^^^^^^^
    441 " </savecontent>
    442 " ^^^^^^^^^^^^^e
    443 sy region cfmlSavecontentTagRegion
    444  \ fold
    445  \ keepend
    446  \ transparent
    447  \ start="\c<cfsavecontent"
    448  \ end="\c</cfsavecontent>"
    449 " / SAVECONTENT REGION AND FOLD }}}
    450 
    451 " CFSCRIPT REGION AND FOLD {{{
    452 " <cfscript>
    453 " s^^^^^^^^^
    454 " </cfscript>
    455 " ^^^^^^^^^^e
    456 "\cfmlCustomScope,
    457 sy region cfmlScriptTagRegion
    458  \ fold
    459  \ keepend
    460  \ transparent
    461  \ start="\c<cfscript>"
    462  \ end="\c</cfscript>"
    463  \ contains=
    464    \@cfmlComment,
    465    \@cfmlFlowStatement,
    466    \cfmlHashSurround,
    467    \@cfmlOperator,
    468    \@cfmlParenthesisRegion,
    469    \@cfmlPunctuation,
    470    \cfmlBoolean,
    471    \cfmlBrace,
    472    \cfmlCoreKeyword,
    473    \cfmlCoreScope,
    474    \cfmlCustomKeyword,
    475    \cfmlCustomScope,
    476    \cfmlEqualSign,
    477    \cfmlFunctionDefinition,
    478    \cfmlFunctionName,
    479    \cfmlNumber,
    480    \cfmlOddFunction,
    481    \cfmlStorageKeyword,
    482    \cfmlTagEnd,
    483    \cfmlTagStart
    484 " / CFSCRIPT REGION AND FOLD }}}
    485 
    486 " CFSWITCH REGION AND FOLD {{{
    487 " <cfswitch
    488 " s^^^^^^^^
    489 " </cfswitch>
    490 " ^^^^^^^^^^e
    491 sy region cfmlSwitchTagRegion
    492  \ fold
    493  \ keepend
    494  \ transparent
    495  \ start="\c<cfswitch"
    496  \ end="\c</cfswitch>"
    497 " / CFSWITCH REGION AND FOLD }}}
    498 
    499 " CFTRANSACTION REGION AND FOLD {{{
    500 " <cftransaction
    501 " s^^^^^^^^^^^^^
    502 " </cftransaction>
    503 " ^^^^^^^^^^^^^^^e
    504 sy region cfmlTransactionTagRegion
    505  \ fold
    506  \ keepend
    507  \ transparent
    508  \ start="\c<cftransaction"
    509  \ end="\c</cftransaction>"
    510 " / CFTRANSACTION REGION AND FOLD }}}
    511 
    512 " CUSTOM TAG REGION AND FOLD {{{
    513 " <cf_...>
    514 " s^^^   ^
    515 " </cf_...>
    516 " ^^^^^   e
    517 sy region cfmlCustomTagRegion
    518  \ fold
    519  \ keepend
    520  \ transparent
    521  \ start="\c<cf_[^>]*>"
    522  \ end="\c</cf_[^>]*>"
    523 " / CUSTOM TAG REGION AND FOLD }}}
    524 
    525 " / TAG REGION AND FOLDING }}}
    526 
    527 " COMMENT {{{
    528 
    529 " COMMENT BLOCK {{{
    530 " /*...*/
    531 " s^   ^e
    532 sy region cfmlCommentBlock
    533  \ keepend
    534  \ start="/\*"
    535  \ end="\*/"
    536  \ contains=
    537    \cfmlMetaData
    538 " / COMMENT BLOCK }}}
    539 
    540 " COMMENT LINE {{{
    541 " //...
    542 " s^
    543 sy match cfmlCommentLine
    544        \ "\/\/.*"
    545 " / COMMENT LINE }}}
    546 
    547 sy cluster cfmlComment
    548  \ contains=
    549    \cfmlCommentBlock,
    550    \cfmlCommentLine
    551 " / COMMENT }}}
    552 
    553 " TAG COMMENT {{{
    554 " <!---...--->
    555 " s^^^^   ^^^e
    556 sy region cfmlTagComment
    557  \ keepend
    558    \ start="<!---"
    559    \ end="--->"
    560    \ contains=
    561      \cfmlTagComment
    562 " / TAG COMMENT }}}
    563 
    564 " FLOW STATEMENT {{{
    565 " BRANCH FLOW KEYWORD {{{
    566 sy keyword cfmlBranchFlowKeyword
    567  \ break
    568  \ continue
    569  \ return
    570 
    571 " / BRANCH KEYWORD }}}
    572 
    573 " DECISION FLOW KEYWORD {{{
    574 sy keyword cfmlDecisionFlowKeyword
    575  \ case
    576  \ defaultcase
    577  \ else
    578  \ if
    579  \ switch
    580 
    581 " / DECISION FLOW KEYWORD }}}
    582 
    583 " LOOP FLOW KEYWORD {{{
    584 sy keyword cfmlLoopFlowKeyword
    585  \ do
    586  \ for
    587  \ in
    588  \ while
    589 
    590 " / LOOP FLOW KEYWORD }}}
    591 
    592 " TRY FLOW KEYWORD {{{
    593 sy keyword cfmlTryFlowKeyword
    594  \ catch
    595  \ finally
    596  \ rethrow
    597  \ throw
    598  \ try
    599 
    600 " / TRY FLOW KEYWORD }}}
    601 
    602 sy cluster cfmlFlowStatement
    603  \ contains=
    604    \cfmlBranchFlowKeyword,
    605    \cfmlDecisionFlowKeyword,
    606    \cfmlLoopFlowKeyword,
    607    \cfmlTryFlowKeyword
    608 
    609 " / FLOW STATEMENT }}}
    610 
    611 " STORAGE KEYWORD {{{
    612 sy keyword cfmlStorageKeyword
    613    \ var
    614 " / STORAGE KEYWORD }}}
    615 
    616 " STORAGE TYPE {{{
    617 sy match cfmlStorageType
    618  \ contained
    619  \ "\v<
    620    \(any
    621    \|array
    622    \|binary
    623    \|boolean
    624    \|date
    625    \|numeric
    626    \|query
    627    \|string
    628    \|struct
    629    \|uuid
    630    \|void
    631    \|xml
    632  \){1}\ze(\s*\=)@!"
    633 " / STORAGE TYPE }}}
    634 
    635 " CORE KEYWORD {{{
    636 sy match cfmlCoreKeyword
    637  \ "\v<
    638    \(new
    639    \|required
    640    \)\ze\s"
    641 " / CORE KEYWORD }}}
    642 
    643 " CORE SCOPE {{{
    644 sy match cfmlCoreScope
    645  \ "\v<
    646    \(application
    647    \|arguments
    648    \|attributes
    649    \|caller
    650    \|cfcatch
    651    \|cffile
    652    \|cfhttp
    653    \|cgi
    654    \|client
    655    \|cookie
    656    \|form
    657    \|local
    658    \|request
    659    \|server
    660    \|session
    661    \|super
    662    \|this
    663    \|thisTag
    664    \|thread
    665    \|variables
    666    \|url
    667    \){1}\ze(,|\.|\[|\)|\s)"
    668 " / CORE SCOPE }}}
    669 
    670 " SQL STATEMENT {{{
    671 sy cluster cfmlSqlStatement
    672  \ contains=
    673    \@cfmlParenthesisRegion,
    674    \@cfmlQuote,
    675    \@cfmlQuotedValue,
    676    \@sqlSyntax,
    677    \cfmlBoolean,
    678    \cfmlDot,
    679    \cfmlEqualSign,
    680    \cfmlFunctionName,
    681    \cfmlHashSurround,
    682    \cfmlNumber
    683 " / SQL STATEMENT }}}
    684 
    685 " TAG IN SCRIPT {{{
    686 sy match cfmlTagNameInScript
    687    \ "\vcf_*\w+\s*\ze\("
    688 " / TAG IN SCRIPT }}}
    689 
    690 " METADATA {{{
    691 sy region cfmlMetaData
    692  \ contained
    693  \ keepend
    694  \ start="@\w\+"
    695  \ end="$"
    696  \ contains=
    697    \cfmlMetaDataName
    698 
    699 sy match cfmlMetaDataName
    700    \ contained
    701    \ "@\w\+"
    702 " / METADATA }}}
    703 
    704 " COMPONENT DEFINITION {{{
    705 sy region cfmlComponentDefinition
    706  \ start="component"
    707  \ end="{"me=e-1
    708  \ contains=
    709    \@cfmlAttribute,
    710    \cfmlComponentKeyword
    711 
    712 sy match cfmlComponentKeyword
    713  \ contained
    714  \ "\v<component>"
    715 " / COMPONENT DEFINITION }}}
    716 
    717 " INTERFACE DEFINITION {{{
    718 sy match cfmlInterfaceDefinition
    719  \ "interface\s.*{"me=e-1
    720  \ contains=
    721    \cfmlInterfaceKeyword
    722 
    723 sy match cfmlInterfaceKeyword
    724    \ contained
    725    \ "\v<interface>"
    726 " / INTERFACE DEFINITION }}}
    727 
    728 " PROPERTY {{{
    729 sy region cfmlProperty
    730  \ transparent
    731  \ start="\v<property>"
    732  \ end=";"me=e-1
    733  \ contains=
    734    \@cfmlQuotedValue,
    735    \cfmlAttrEqualSign,
    736    \cfmlAttrName,
    737    \cfmlAttrValue,
    738    \cfmlPropertyKeyword
    739 
    740 sy match cfmlPropertyKeyword
    741        \ contained
    742        \ "\v<property>"
    743 " / PROPERTY }}}
    744 
    745 " FUNCTION DEFINITION {{{
    746 sy match cfmlFunctionDefinition
    747  \ "\v
    748    \(<(public|private|package)\s){,1}
    749    \(<
    750      \(any
    751      \|array
    752      \|binary
    753      \|boolean
    754      \|date
    755      \|numeric
    756      \|query
    757      \|string
    758      \|struct
    759      \|uuid
    760      \|void
    761      \|xml
    762    \)\s){,1}
    763  \<function\s\w+\s*\("me=e-1
    764  \ contains=
    765    \cfmlFunctionKeyword,
    766    \cfmlFunctionModifier,
    767    \cfmlFunctionName,
    768    \cfmlFunctionReturnType
    769 
    770 " FUNCTION KEYWORD {{{
    771 sy match cfmlFunctionKeyword
    772  \ contained
    773  \ "\v<function>"
    774 " / FUNCTION KEYWORD }}}
    775 
    776 " FUNCTION MODIFIER {{{
    777 sy match cfmlFunctionModifier
    778  \ contained
    779    \ "\v<
    780    \(public
    781    \|private
    782    \|package
    783    \)>"
    784 " / FUNCTION MODIFIER }}}
    785 
    786 " FUNCTION RETURN TYPE {{{
    787 sy match cfmlFunctionReturnType
    788  \ contained
    789    \ "\v
    790    \(any
    791    \|array
    792    \|binary
    793    \|boolean
    794    \|date
    795    \|numeric
    796    \|query
    797    \|string
    798    \|struct
    799    \|uuid
    800    \|void
    801    \|xml
    802    \)"
    803 " / FUNCTION RETURN TYPE }}}
    804 
    805 " FUNCTION NAME {{{
    806 " specific regex for core functions decreases performance
    807 " so use the same highlighting for both function types
    808 sy match cfmlFunctionName
    809    \ "\v<(cf|if|elseif|throw)@!\w+\s*\ze\("
    810 " / FUNCTION NAME }}}
    811 
    812 " / FUNCTION DEFINITION }}}
    813 
    814 " ODD FUNCTION {{{
    815 sy region cfmlOddFunction
    816  \ transparent
    817  \ start="\v<
    818    \(abort
    819    \|exit
    820    \|import
    821    \|include
    822    \|lock
    823    \|pageencoding
    824    \|param
    825    \|savecontent
    826    \|thread
    827    \|transaction
    828    \){1}"
    829  \ end="\v(\{|;)"me=e-1
    830  \ contains=
    831    \@cfmlQuotedValue,
    832    \cfmlAttrEqualSign,
    833    \cfmlAttrName,
    834    \cfmlAttrValue,
    835    \cfmlCoreKeyword,
    836    \cfmlOddFunctionKeyword,
    837    \cfmlCoreScope
    838 
    839 " ODD FUNCTION KEYWORD {{{
    840 sy match cfmlOddFunctionKeyword
    841  \ contained
    842    \ "\v<
    843    \(abort
    844    \|exit
    845    \|import
    846    \|include
    847    \|lock
    848    \|pageencoding
    849    \|param
    850    \|savecontent
    851    \|thread
    852    \|transaction
    853    \)\ze(\s|$|;)"
    854 " / ODD FUNCTION KEYWORD }}}
    855 
    856 " / ODD FUNCTION }}}
    857 
    858 " CUSTOM {{{
    859 
    860 " CUSTOM KEYWORD {{{
    861 sy match cfmlCustomKeyword
    862  \ contained
    863    \ "\v<
    864    \(customKeyword1
    865    \|customKeyword2
    866    \|customKeyword3
    867    \)>"
    868 " / CUSTOM KEYWORD }}}
    869 
    870 " CUSTOM SCOPE {{{
    871 sy match cfmlCustomScope
    872  \ contained
    873    \ "\v<
    874    \(prc
    875    \|rc
    876    \|event
    877    \|(\w+Service)
    878    \){1}\ze(\.|\[)"
    879 " / CUSTOM SCOPE }}}
    880 
    881 " / CUSTOM }}}
    882 
    883 " SGML TAG START AND END {{{
    884 " SGML tag start
    885 " <...>
    886 " s^^^e
    887 sy region cfmlSGMLTagStart
    888  \ keepend
    889  \ transparent
    890  \ start="\v(\<cf)@!\zs\<\w+"
    891  \ end=">"
    892  \ contains=
    893    \@cfmlAttribute,
    894    \@cfmlComment,
    895    \@cfmlOperator,
    896    \@cfmlParenthesisRegion,
    897    \@cfmlPunctuation,
    898    \@cfmlQuote,
    899    \@cfmlQuotedValue,
    900    \cfmlAttrEqualSign,
    901    \cfmlBoolean,
    902    \cfmlBrace,
    903    \cfmlCoreKeyword,
    904    \cfmlCoreScope,
    905    \cfmlCustomKeyword,
    906    \cfmlCustomScope,
    907    \cfmlEqualSign,
    908    \cfmlFunctionName,
    909    \cfmlNumber,
    910    \cfmlStorageKeyword,
    911    \cfmlStorageType,
    912    \cfmlTagBracket,
    913    \cfmlSGMLTagName
    914 
    915 " SGML tag end
    916 " </...>
    917 " s^^^^e
    918 sy match cfmlSGMLTagEnd
    919  \ transparent
    920  \ "\v(\<\/cf)@!\zs\<\/\w+\>"
    921  \ contains=
    922    \cfmlTagBracket,
    923    \cfmlSGMLTagName
    924 
    925 " SGML tag name
    926 " <...>
    927 " s^^^e
    928 sy match cfmlSGMLTagName
    929  \ contained
    930  \ "\v(\<\/*)\zs\w+"
    931 
    932 " / SGML TAG START AND END }}}
    933 
    934 " HIGHLIGHTING {{{
    935 
    936 hi link cfmlNumber Number
    937 hi link cfmlBoolean Boolean
    938 hi link cfmlEqualSign Keyword
    939 " HASH SURROUND
    940 hi link cfmlHash PreProc
    941 hi link cfmlHashSurround PreProc
    942 " OPERATOR
    943 hi link cfmlArithmeticOperator Function
    944 hi link cfmlBooleanOperator Function
    945 hi link cfmlDecisionOperator Function
    946 hi link cfmlStringOperator Function
    947 hi link cfmlTernaryOperator Function
    948 " PARENTHESIS
    949 hi link cfmlParenthesis1 Statement
    950 hi link cfmlParenthesis2 String
    951 hi link cfmlParenthesis3 Delimiter
    952 " BRACE
    953 hi link cfmlBrace PreProc
    954 " PUNCTUATION - BRACKET
    955 hi link cfmlBracket Statement
    956 " PUNCTUATION - CHAR
    957 hi link cfmlComma Comment
    958 hi link cfmlDot Comment
    959 hi link cfmlSemiColon Comment
    960 " PUNCTUATION - QUOTE
    961 hi link cfmlDoubleQuote String
    962 hi link cfmlDoubleQuotedValue String
    963 hi link cfmlSingleQuote String
    964 hi link cfmlSingleQuotedValue String
    965 " TAG START AND END
    966 hi link cfmlTagName Function
    967 hi link cfmlTagBracket Comment
    968 " ATTRIBUTE NAME AND VALUE
    969 hi link cfmlAttrName Type
    970 hi link cfmlAttrValue Special
    971 " COMMENT
    972 hi link cfmlCommentBlock Comment
    973 hi link cfmlCommentLine Comment
    974 hi link cfmlTagComment Comment
    975 " FLOW STATEMENT
    976 hi link cfmlDecisionFlowKeyword Conditional
    977 hi link cfmlLoopFlowKeyword Repeat
    978 hi link cfmlTryFlowKeyword Exception
    979 hi link cfmlBranchFlowKeyword Keyword
    980 " STORAGE KEYWORD
    981 hi link cfmlStorageKeyword Keyword
    982 " STORAGE TYPE
    983 hi link cfmlStorageType Keyword
    984 " CORE KEYWORD
    985 hi link cfmlCoreKeyword PreProc
    986 " CORE SCOPE
    987 hi link cfmlCoreScope Keyword
    988 " TAG IN SCRIPT
    989 hi link cfmlTagNameInScript Function
    990 " METADATA
    991 " meta data value = cfmlMetaData
    992 hi link cfmlMetaData String
    993 hi link cfmlMetaDataName Type
    994 " COMPONENT DEFINITION
    995 hi link cfmlComponentKeyword Keyword
    996 " INTERFACE DEFINITION
    997 hi link cfmlInterfaceKeyword Keyword
    998 " PROPERTY
    999 hi link cfmlPropertyKeyword Keyword
   1000 " FUNCTION DEFINITION
   1001 hi link cfmlFunctionKeyword Keyword
   1002 hi link cfmlFunctionModifier Keyword
   1003 hi link cfmlFunctionReturnType Keyword
   1004 hi link cfmlFunctionName Function
   1005 " ODD FUNCTION
   1006 hi link cfmlOddFunctionKeyword Function
   1007 " CUSTOM
   1008 hi link cfmlCustomKeyword Keyword
   1009 hi link cfmlCustomScope Structure
   1010 " SGML TAG
   1011 hi link cfmlSGMLTagName Ignore
   1012 
   1013 " / HIGHLIGHTING }}}
   1014 
   1015 let b:current_syntax = "cfml"
   1016 
   1017 let &cpo = s:cpo_save
   1018 unlet s:cpo_save