Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Highlight @identifiers as identifiers

  • Loading branch information...
commit e3910fd5f2bc4a9200af35471d11047f063f1036 1 parent 4418198
@kchmck authored
Showing with 15 additions and 12 deletions.
  1. +15 −12 syntax/coffee.vim
View
27 syntax/coffee.vim
@@ -63,10 +63,12 @@ hi def link coffeeGlobal Type
" A special variable
syn match coffeeSpecialVar /\<\%(this\|prototype\|arguments\)\>/ display
-" An @-variable
-syn match coffeeSpecialVar /@\%(\I\i*\)\?/ display
hi def link coffeeSpecialVar Special
+" An @-variable
+syn match coffeeSpecialIdent /@\%(\I\i*\)\?/ display
+hi def link coffeeSpecialIdent Identifier
+
" A class-like name that starts with a capital letter
syn match coffeeObject /\<\u\w*\>/ display
hi def link coffeeObject Structure
@@ -76,8 +78,8 @@ syn match coffeeConstant /\<\u[A-Z0-9_]\+\>/ display
hi def link coffeeConstant Constant
" A variable name
-syn cluster coffeeIdentifier contains=coffeeSpecialVar,coffeeObject,
-\ coffeeConstant
+syn cluster coffeeIdentifier contains=coffeeSpecialVar,coffeeSpecialIdent,
+\ coffeeObject,coffeeConstant
" A non-interpolated string
syn cluster coffeeBasicString contains=@Spell,coffeeEscape
@@ -204,14 +206,15 @@ hi def link coffeeParen coffeeBlock
syn cluster coffeeAll contains=coffeeStatement,coffeeRepeat,coffeeConditional,
\ coffeeException,coffeeKeyword,coffeeOperator,
\ coffeeExtendedOp,coffeeSpecialOp,coffeeBoolean,
-\ coffeeGlobal,coffeeSpecialVar,coffeeObject,
-\ coffeeConstant,coffeeString,coffeeNumber,
-\ coffeeFloat,coffeeReservedError,coffeeObjAssign,
-\ coffeeComment,coffeeBlockComment,coffeeEmbed,
-\ coffeeRegex,coffeeHeregex,coffeeHeredoc,
-\ coffeeSpaceError,coffeeSemicolonError,
-\ coffeeDotAccess,coffeeProtoAccess,
-\ coffeeCurlies,coffeeBrackets,coffeeParens
+\ coffeeGlobal,coffeeSpecialVar,coffeeSpecialIdent,
+\ coffeeObject,coffeeConstant,coffeeString,
+\ coffeeNumber,coffeeFloat,coffeeReservedError,
+\ coffeeObjAssign,coffeeComment,coffeeBlockComment,
+\ coffeeEmbed,coffeeRegex,coffeeHeregex,
+\ coffeeHeredoc,coffeeSpaceError,
+\ coffeeSemicolonError,coffeeDotAccess,
+\ coffeeProtoAccess,coffeeCurlies,coffeeBrackets,
+\ coffeeParens
if !exists('b:current_syntax')
let b:current_syntax = 'coffee'

1 comment on commit e3910fd

@sukima

Thank you! thank you for this! :thumbsup: :grinning:

Please sign in to comment.
Something went wrong with that request. Please try again.