summaryrefslogtreecommitdiffstats
path: root/after/syntax/haml.vim
blob: 5128f7e5afce3cb0ec1dde5abf67d2e69b44292d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1
  
" Language:    CoffeeScript
" Maintainer:  Sven Felix Oberquelle <Svelix.Github@gmail.com>
" URL:         http://github.com/kchmck/vim-coffee-script
" License:     WTFPL


if exists('b:current_syntax')
  let s:current_syntax_save = b:current_syntax
endif

" Inherit coffee from html so coffeeComment isn't redefined and given higher
" priority than hamlInterpolation.
syn cluster hamlCoffeescript contains=@htmlCoffeeScript
syn region  hamlCoffeescriptFilter matchgroup=hamlFilter
\                                  start="^\z(\s*\):coffee\z(script\)\?\s*$"
\                                  end="^\%(\z1 \| *$\)\@!"
\                                  contains=@hamlCoffeeScript,hamlInterpolation
\                                  keepend

if exists('s:current_syntax_save')
  let b:current_syntax = s:current_syntax_save
  unlet s:current_syntax_save
endif

endif