From d824b79e6c1e97e49f69e65612b07688689bd8a5 Mon Sep 17 00:00:00 2001 From: Sean Clark Hess Date: Thu, 20 Sep 2012 17:18:48 -0600 Subject: [PATCH 1/2] added function highlighting --- syntax/coffee.vim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/syntax/coffee.vim b/syntax/coffee.vim index da39e34..a5acc63 100755 --- a/syntax/coffee.vim +++ b/syntax/coffee.vim @@ -117,6 +117,9 @@ endif syn match coffeeObjAssign /@\?\I\i*\s*\ze::\@!/ contains=@coffeeIdentifier display hi def link coffeeObjAssign Identifier +syn match coffeeFunction /\w\+\(\s*=.*\->\)\@=/ contains=@coffeeIdentifier display +hi def link coffeeFunction Function + syn keyword coffeeTodo TODO FIXME XXX contained hi def link coffeeTodo Todo From 93e4da438536873dcffd797994cecd74632ba2c2 Mon Sep 17 00:00:00 2001 From: Sean Clark Hess Date: Thu, 27 Sep 2012 11:14:34 -0600 Subject: [PATCH 2/2] improvements to function regex --- syntax/coffee.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/syntax/coffee.vim b/syntax/coffee.vim index a5acc63..c496aa7 100755 --- a/syntax/coffee.vim +++ b/syntax/coffee.vim @@ -117,7 +117,8 @@ endif syn match coffeeObjAssign /@\?\I\i*\s*\ze::\@!/ contains=@coffeeIdentifier display hi def link coffeeObjAssign Identifier -syn match coffeeFunction /\w\+\(\s*=.*\->\)\@=/ contains=@coffeeIdentifier display +syn match coffeeFunction /@\?\I.*\w\+\ze\s*=\s*.*\->/ contains=@coffeeIdentifier display +"syn match coffeeFunction /.*\w\+\ze\s*=\s*\((.*\->|\->\)/ contains=@coffeeIdentifier display hi def link coffeeFunction Function syn keyword coffeeTodo TODO FIXME XXX contained