From cc868aee51c3880f08832cca0bf1351334d61794 Mon Sep 17 00:00:00 2001 From: Adam Stankiewicz Date: Thu, 2 Feb 2017 21:49:51 +0100 Subject: Add vue support, closes #160 --- syntax/vue.vim | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 syntax/vue.vim (limited to 'syntax/vue.vim') diff --git a/syntax/vue.vim b/syntax/vue.vim new file mode 100644 index 00000000..89b5b794 --- /dev/null +++ b/syntax/vue.vim @@ -0,0 +1,112 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vue') == -1 + +" Vim syntax file +" Language: Vue.js +" Maintainer: Eduardo San Martin Morote + +if exists("b:current_syntax") + finish +endif + +if !exists("s:syntaxes") + " Search available syntax files. + function s:search_syntaxes(...) + let syntaxes = {} + let names = a:000 + for name in names + let syntaxes[name] = 0 + endfor + + for path in split(&runtimepath, ',') + if isdirectory(path . '/syntax') + for name in names + let syntaxes[name] = syntaxes[name] || filereadable(path . '/syntax/' . name . '.vim') + endfor + endif + endfor + return syntaxes + endfunction + + let s:syntaxes = s:search_syntaxes('pug', 'slm', 'coffee', 'stylus', 'sass', 'scss', 'less') +endif + + +syntax include @HTML syntax/html.vim +if exists("b:current_syntax") + unlet b:current_syntax +endif +syntax region html keepend start=/^