diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2015-12-17 10:48:07 +0100 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2015-12-17 10:49:17 +0100 |
commit | 7679a92627661ef2d6878079a5c53bf3669aabf7 (patch) | |
tree | 1c7d94fce4cf982d2bd57e31b886c6a112bb12c0 /syntax/ansible_template.vim | |
parent | ad44c4f7a316e798a9354197b20a80eabf280f1a (diff) | |
download | vim-polyglot-7679a92627661ef2d6878079a5c53bf3669aabf7.tar.gz vim-polyglot-7679a92627661ef2d6878079a5c53bf3669aabf7.zip |
Add ansible support, closes #96
Diffstat (limited to 'syntax/ansible_template.vim')
-rw-r--r-- | syntax/ansible_template.vim | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/syntax/ansible_template.vim b/syntax/ansible_template.vim new file mode 100644 index 00000000..31ca4b24 --- /dev/null +++ b/syntax/ansible_template.vim @@ -0,0 +1,31 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1 + +" Vim syntax file +" Language: Ansible YAML/Jinja templates +" Maintainer: Dave Honneffer <pearofducks@gmail.com> +" Last Change: 2015.09.06 + +if exists("b:current_syntax") + finish +endif + +if !exists("main_syntax") + let main_syntax = 'jinja2' +endif + +let b:current_syntax = '' +unlet b:current_syntax +runtime! syntax/jinja2.vim + +if exists("g:ansible_extra_syntaxes") + let s:extra_syntax = split(g:ansible_extra_syntaxes) + for syntax_name in s:extra_syntax + let b:current_syntax = '' + unlet b:current_syntax + execute 'runtime!' "syntax/" . syntax_name + endfor +endif + +let b:current_syntax = "ansible_template" + +endif |