From 30c1920e4fa4e612238e1f435907c40ecfa47f33 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Sat, 2 Nov 2013 23:27:57 +0100 Subject: Massive update :) --- syntax/coffee.vim | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'syntax/coffee.vim') diff --git a/syntax/coffee.vim b/syntax/coffee.vim index eea50840..7f8df73c 100755 --- a/syntax/coffee.vim +++ b/syntax/coffee.vim @@ -15,9 +15,6 @@ silent! unlet b:current_syntax " Highlight long strings. syntax sync fromstart -" CoffeeScript identifiers can have dollar signs. -setlocal isident+=$ - " These are `matches` instead of `keywords` because vim's highlighting " priority for keywords is higher than matches. This causes keywords to be " highlighted inside matches, even if a match says it shouldn't contain them -- @@ -67,7 +64,7 @@ syn match coffeeSpecialVar /\<\%(this\|prototype\|arguments\)\>/ display hi def link coffeeSpecialVar Special " An @-variable -syn match coffeeSpecialIdent /@\%(\I\i*\)\?/ display +syn match coffeeSpecialIdent /@\%(\%(\I\|\$\)\%(\i\|\$\)*\)\?/ display hi def link coffeeSpecialIdent Identifier " A class-like name that starts with a capital letter @@ -95,15 +92,16 @@ syn region coffeeString start=/'/ skip=/\\\\\|\\'/ end=/'/ hi def link coffeeString String " A integer, including a leading plus or minus -syn match coffeeNumber /\i\@/ display syn match coffeeNumber /\<0[bB][01]\+\>/ display syn match coffeeNumber /\<0[oO][0-7]\+\>/ display +syn match coffeeNumber /\<\%(Infinity\|NaN\)\>/ display hi def link coffeeNumber Number " A floating-point number, including a leading plus or minus -syn match coffeeFloat /\i\@