diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2019-09-27 19:47:32 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2019-09-27 19:47:32 +0200 |
commit | f95026252c5a31242903a98c741887696dfbb11f (patch) | |
tree | cd697cdc96c20a44f03ff3aacc67f78fdcc6ece5 /ftplugin | |
parent | 4f3df59be709bf0d5c5c67dc804fde49abdc2700 (diff) | |
download | vim-polyglot-f95026252c5a31242903a98c741887696dfbb11f.tar.gz vim-polyglot-f95026252c5a31242903a98c741887696dfbb11f.zip |
Update everything, closes #435
Diffstat (limited to 'ftplugin')
-rw-r--r-- | ftplugin/embeddedpuppet.vim | 79 | ||||
-rw-r--r-- | ftplugin/mako.vim | 12 | ||||
-rw-r--r-- | ftplugin/puppet.vim | 35 | ||||
-rw-r--r-- | ftplugin/systemd.vim | 26 | ||||
-rw-r--r-- | ftplugin/zig.vim | 6 |
5 files changed, 146 insertions, 12 deletions
diff --git a/ftplugin/embeddedpuppet.vim b/ftplugin/embeddedpuppet.vim new file mode 100644 index 00000000..50a69ea8 --- /dev/null +++ b/ftplugin/embeddedpuppet.vim @@ -0,0 +1,79 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 + +" Vim filetype plugin +" Language: embedded puppet +" Maintainer: Gabriel Filion <gabster@lelutin.ca> +" URL: https://github.com/rodjek/vim-puppet +" Last Change: 2019-09-01 + +" Only do this when not done yet for this buffer +if exists("b:did_ftplugin") + finish +endif + +let s:save_cpo = &cpo +set cpo-=C + +" Define some defaults in case the included ftplugins don't set them. +let s:undo_ftplugin = "" +let s:browsefilter = "All Files (*.*)\t*.*\n" +let s:match_words = "" + +runtime! ftplugin/sh.vim +unlet! b:did_ftplugin + +" Override our defaults if these were set by an included ftplugin. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin + unlet b:undo_ftplugin +endif +if exists("b:browsefilter") + let s:browsefilter = b:browsefilter + unlet b:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words + unlet b:match_words +endif + +let s:include = &l:include +let s:path = &l:path +let s:suffixesadd = &l:suffixesadd + +runtime! ftplugin/puppet.vim +let b:did_ftplugin = 1 + +" Combine the new set of values with those previously included. +if exists("b:undo_ftplugin") + let s:undo_ftplugin = b:undo_ftplugin . " | " . s:undo_ftplugin +endif +if exists ("b:browsefilter") + let s:browsefilter = substitute(b:browsefilter,'\cAll Files (\*\.\*)\t\*\.\*\n','','') . s:browsefilter +endif +if exists("b:match_words") + let s:match_words = b:match_words . ',' . s:match_words +endif + +if len(s:include) + let &l:include = s:include +endif +let &l:path = s:path . (s:path =~# ',$\|^$' ? '' : ',') . &l:path +let &l:suffixesadd = s:suffixesadd . (s:suffixesadd =~# ',$\|^$' ? '' : ',') . &l:suffixesadd +unlet s:include s:path s:suffixesadd + +" Load the combined list of match_words for matchit.vim +if exists("loaded_matchit") + let b:match_words = s:match_words +endif + +" TODO: comments= +setlocal commentstring=<%#%s%> + +let b:undo_ftplugin = "setl cms< " + \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin + +let &cpo = s:save_cpo +unlet s:save_cpo + + +endif diff --git a/ftplugin/mako.vim b/ftplugin/mako.vim index 81943b68..6d63492b 100644 --- a/ftplugin/mako.vim +++ b/ftplugin/mako.vim @@ -3,8 +3,8 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mako') == -1 " Vim filetype plugin file " Language: Mako " Maintainer: Randy Stauner <randy@magnificent-tears.com> -" Last Change: 2014-02-07 -" Version: 0.1 +" Last Change: 2019-09-06 +" Version: 0.2 if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 @@ -12,4 +12,12 @@ let b:did_ftplugin = 1 setlocal comments=:## setlocal commentstring=##%s +if exists("loaded_matchit") + let b:match_ignorecase = 1 + let b:match_words = "<:>," . + \ "<\@<=[ou]l\>[^>]*\%(>\|$\):<\@<=li\>:<\@<=/[ou]l>," . + \ "<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>," . + \ "<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>" +endif + endif diff --git a/ftplugin/puppet.vim b/ftplugin/puppet.vim index 3c843314..53247958 100644 --- a/ftplugin/puppet.vim +++ b/ftplugin/puppet.vim @@ -1,11 +1,32 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 -setl ts=2 -setl sts=2 -setl sw=2 -setl et -setl keywordprg=puppet\ describe\ --providers -setl iskeyword=-,:,@,48-57,_,192-255 -setl cms=#\ %s +" Vim filetype plugin +" Language: Puppet +" Maintainer: Tim Sharpe <tim@sharpe.id.au> +" URL: https://github.com/rodjek/vim-puppet +" Last Change: 2019-08-31 + +if (exists("b:did_ftplugin")) + finish +endif +let b:did_ftplugin = 1 + +setlocal tabstop=2 +setlocal softtabstop=2 +setlocal shiftwidth=2 +setlocal expandtab +setlocal keywordprg=puppet\ describe\ --providers +setlocal iskeyword=:,@,48-57,_,192-255 +setlocal comments=sr:/*,mb:*,ex:*/,b:# +setlocal commentstring=#\ %s + +setlocal formatoptions-=t formatoptions+=croql +setlocal formatexpr=puppet#format#Format() + +let b:undo_ftplugin = " + \ setlocal tabstop< tabstop< softtabstop< shiftwidth< expandtab< + \| setlocal keywordprg< iskeyword< comments< commentstring< + \| setlocal formatoptions< formatexpr< + \" endif diff --git a/ftplugin/systemd.vim b/ftplugin/systemd.vim new file mode 100644 index 00000000..6e757d91 --- /dev/null +++ b/ftplugin/systemd.vim @@ -0,0 +1,26 @@ +if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'systemd') == -1 + +" Vim filetype plugin file +" Language: systemd unit files +" Previous Maintainer: Will Woods <wwoods@redhat.com> +" Latest Revision: Sep 25, 2019 + +" These are, as it turns out, exactly the same settings as ftplugin/conf.vim + +if exists("b:did_ftplugin") + finish +endif +let b:did_ftplugin = 1 + +let s:cpo_save = &cpo +set cpo&vim + +let b:undo_ftplugin = "setl com< cms< fo<" + +setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql + +let &cpo = s:cpo_save +unlet s:cpo_save + + +endif diff --git a/ftplugin/zig.vim b/ftplugin/zig.vim index 72983ceb..e49c5bc5 100644 --- a/ftplugin/zig.vim +++ b/ftplugin/zig.vim @@ -7,9 +7,9 @@ endif let b:did_ftplugin = 1 -set expandtab -set tabstop=4 -set shiftwidth=4 +setlocal expandtab +setlocal tabstop=4 +setlocal shiftwidth=4 setlocal suffixesadd=.zig setlocal commentstring=//\ %s |