diff options
Diffstat (limited to 'after')
-rw-r--r-- | after/ftplugin/javascript.vim | 6 | ||||
-rw-r--r-- | after/syntax/haml.vim | 10 | ||||
-rw-r--r-- | after/syntax/html.vim | 9 |
3 files changed, 24 insertions, 1 deletions
diff --git a/after/ftplugin/javascript.vim b/after/ftplugin/javascript.vim index e5324c1b..e9214981 100644 --- a/after/ftplugin/javascript.vim +++ b/after/ftplugin/javascript.vim @@ -7,6 +7,10 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'javascript') == setlocal iskeyword+=$ suffixesadd+=.js -let b:undo_ftplugin .= ' | setlocal iskeyword< suffixesadd<' +if exists('b:undo_ftplugin') + let b:undo_ftplugin .= ' | setlocal iskeyword< suffixesadd<' +else + let b:undo_ftplugin = 'setlocal iskeyword< suffixesadd<' +endif endif diff --git a/after/syntax/haml.vim b/after/syntax/haml.vim index 5333de69..5128f7e5 100644 --- a/after/syntax/haml.vim +++ b/after/syntax/haml.vim @@ -5,6 +5,11 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') " 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 @@ -14,4 +19,9 @@ syn region hamlCoffeescriptFilter matchgroup=hamlFilter \ 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 diff --git a/after/syntax/html.vim b/after/syntax/html.vim index 5881b3e8..5979f111 100644 --- a/after/syntax/html.vim +++ b/after/syntax/html.vim @@ -5,6 +5,10 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') " URL: http://github.com/kchmck/vim-coffee-script " License: WTFPL +if exists('b:current_syntax') + let s:current_syntax_save = b:current_syntax +endif + " Syntax highlighting for text/coffeescript script tags syn include @htmlCoffeeScript syntax/coffee.vim syn region coffeeScript start=#<script [^>]*type="text/coffeescript"[^>]*># @@ -12,6 +16,11 @@ syn region coffeeScript start=#<script [^>]*type="text/coffeescript"[^>]*># \ contains=@htmlCoffeeScript,htmlScriptTag,@htmlPreproc \ containedin=htmlHead +if exists('s:current_syntax_save') + let b:current_syntax = s:current_syntax_save + unlet s:current_syntax_save +endif + endif if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'glsl') == -1 |