Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Conditionally include syntax/coffee.vim

  • Loading branch information...
commit 80bb7f0bd27246eb763ff8dabdea74a7154f77c1 1 parent 7dfbdcb
@zakj zakj authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 syntax/slim.vim
4 syntax/slim.vim
@@ -26,6 +26,9 @@ unlet! b:current_syntax
" Include Erb syntax highlighting
syn include @slimErb syntax/eruby.vim
unlet! b:current_syntax
+" Include Coffeescript syntax highlighting, ignoring errors if it's missing
+silent! syn include @slimCoffee syntax/coffee.vim
+unlet! b:current_syntax
" Include HTML
runtime! syntax/html.vim
@@ -45,6 +48,7 @@ syn match slimText /^\(\s*\)[`|'].*\(\n\1\s.*\)*/
syn match slimFilter /\s*\w\+:\s*/ contained
syn match slimJs /^\(\s*\)\<javascript:\>.*\(\n\1\s.*\)*/ contains=@htmlJavaScript,slimFilter
+syn match slimCoffee /^\(\s*\)\<coffee:\>.*\(\n\1\s.*\)*/ contains=@slimCoffee,slimFilter
syn match slimHaml /^\(\s*\)\<haml:\>.*\(\n\1\s.*\)*/ contains=@slimHaml,slimFilter
syn match slimErb /^\(\s*\)\<erb:\>.*\(\n\1\s.*\)*/ contains=@slimErb,slimFilter
Please sign in to comment.
Something went wrong with that request. Please try again.