diff options
Diffstat (limited to 'ftplugin')
260 files changed, 261 insertions, 2081 deletions
diff --git a/ftplugin/8th.vim b/ftplugin/8th.vim index befe694b..5199a7bf 100644 --- a/ftplugin/8th.vim +++ b/ftplugin/8th.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/8th.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('8th', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, '8th') == -1 " Vim ftplugin file " Language: 8th @@ -32,5 +27,3 @@ setlocal fo=tcrqol setlocal matchpairs+=\::; setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 setlocal suffixesadd=.8th - -endif diff --git a/ftplugin/a2ps.vim b/ftplugin/a2ps.vim index d92fdf64..dfcefea7 100644 --- a/ftplugin/a2ps.vim +++ b/ftplugin/a2ps.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/a2ps.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('a2ps', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'a2ps') == -1 " Vim filetype plugin file " Language: a2ps(1) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/aap.vim b/ftplugin/aap.vim index 2d900318..00588ae9 100644 --- a/ftplugin/aap.vim +++ b/ftplugin/aap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/aap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('aap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aap') == -1 " Vim filetype plugin file " Language: Aap recipe @@ -32,5 +27,3 @@ setlocal comments=s:#\ -,m:#\ \ ,e:#,n:#,fb:- " Expand tabs to spaces to avoid trouble. setlocal expandtab - -endif diff --git a/ftplugin/abap.vim b/ftplugin/abap.vim index 96ab0d56..eced7b2b 100644 --- a/ftplugin/abap.vim +++ b/ftplugin/abap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/abap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('abap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abap') == -1 " Vim filetype plugin file " Language: ABAP @@ -36,5 +31,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: set sw=4 sts=4 et tw=80 : - -endif diff --git a/ftplugin/abaqus.vim b/ftplugin/abaqus.vim index 2214d4f4..fb3bd11e 100644 --- a/ftplugin/abaqus.vim +++ b/ftplugin/abaqus.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/abaqus.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('abaqus', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'abaqus') == -1 " Vim filetype plugin file " Language: Abaqus finite element input file (www.abaqus.com) @@ -104,5 +99,3 @@ let b:undo_ftplugin = "let s:cpo_save = &cpoptions|" " Restore saved compatibility options let &cpoptions = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ada.vim b/ftplugin/ada.vim index 1d067182..62d252fd 100644 --- a/ftplugin/ada.vim +++ b/ftplugin/ada.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ada.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ada', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ada') == -1 "------------------------------------------------------------------------------ " Description: Perform Ada specific completion & tagging. @@ -217,5 +212,3 @@ finish " 1}}} "------------------------------------------------------------------------------ " vim: textwidth=78 nowrap tabstop=8 shiftwidth=3 softtabstop=3 noexpandtab " vim: foldmethod=marker - -endif diff --git a/ftplugin/alsaconf.vim b/ftplugin/alsaconf.vim index a481b76a..093c2ab1 100644 --- a/ftplugin/alsaconf.vim +++ b/ftplugin/alsaconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/alsaconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('alsaconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'alsaconf') == -1 " Vim filetype plugin file " Language: alsaconf(8) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ansible.vim b/ftplugin/ansible.vim index cef2e9c4..e6676ccf 100644 --- a/ftplugin/ansible.vim +++ b/ftplugin/ansible.vim @@ -1,13 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ansible.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ansible', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1 set isfname+=@-@ set path+=./../templates,./../files,templates,files - -endif diff --git a/ftplugin/ansible_hosts.vim b/ftplugin/ansible_hosts.vim index 6f819a7e..d6854c20 100644 --- a/ftplugin/ansible_hosts.vim +++ b/ftplugin/ansible_hosts.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ansible_hosts.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ansible', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ansible') == -1 if exists("b:did_ftplugin") finish @@ -16,5 +11,3 @@ endif setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions-=c let b:undo_ftplugin = "setl comments< commentstring< formatoptions<" - -endif diff --git a/ftplugin/ant.vim b/ftplugin/ant.vim index 184818a5..799e03ec 100644 --- a/ftplugin/ant.vim +++ b/ftplugin/ant.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ant.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ant', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ant') == -1 " Vim filetype plugin file " Language: ant @@ -51,5 +46,3 @@ let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/arch.vim b/ftplugin/arch.vim index 5910287e..755963a5 100644 --- a/ftplugin/arch.vim +++ b/ftplugin/arch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/arch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('arch', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'arch') == -1 " Vim filetype plugin file " Language: GNU Arch inventory file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/art.vim b/ftplugin/art.vim index edbc86a3..7b1c4398 100644 --- a/ftplugin/art.vim +++ b/ftplugin/art.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/art.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('art', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'art') == -1 " Vim filetype plugin " Language: ART-IM and ART*Enterprise @@ -22,5 +17,3 @@ run ftplugin/lisp.vim setl lw-=if setl lw+=def-art-fun,deffacts,defglobal,defrule,defschema,for,schema,while - -endif diff --git a/ftplugin/aspvbs.vim b/ftplugin/aspvbs.vim index 4899bfb3..03f38e29 100644 --- a/ftplugin/aspvbs.vim +++ b/ftplugin/aspvbs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/aspvbs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('aspvbs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'aspvbs') == -1 " Vim filetype plugin file " Language: aspvbs @@ -67,5 +62,3 @@ let b:undo_ftplugin = "unlet! b:match_words b:match_ignorecase b:browsefilter | " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/automake.vim b/ftplugin/automake.vim index ed47025c..f3e31757 100644 --- a/ftplugin/automake.vim +++ b/ftplugin/automake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/automake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('automake', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'automake') == -1 " Vim filetype plugin file " Language: Automake @@ -23,5 +18,3 @@ runtime! ftplugin/make.vim ftplugin/make_*.vim ftplugin/make/*.vim let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/awk.vim b/ftplugin/awk.vim index 9bbeb276..9ff6adf6 100644 --- a/ftplugin/awk.vim +++ b/ftplugin/awk.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/awk.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('awk', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'awk') == -1 " Vim filetype plugin " Language: awk, nawk, gawk, mawk @@ -62,5 +57,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nowrap sw=2 sts=2 ts=8 - -endif diff --git a/ftplugin/bdf.vim b/ftplugin/bdf.vim index 74b50871..aaf1def0 100644 --- a/ftplugin/bdf.vim +++ b/ftplugin/bdf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/bdf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bdf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bdf') == -1 " Vim filetype plugin file " Language: BDF font definition @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/blade.vim b/ftplugin/blade.vim index 4fa102d9..ee75475e 100644 --- a/ftplugin/blade.vim +++ b/ftplugin/blade.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/blade.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('blade', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'blade') == -1 " Vim filetype plugin " Language: Blade (Laravel) @@ -40,5 +35,3 @@ if exists('loaded_matchit') && exists('b:match_words') let b:match_skip = 'synIDattr(synID(line("."), col("."), 0), "name") !=# "bladeKeyword"' let b:match_ignorecase = 0 endif - -endif diff --git a/ftplugin/bst.vim b/ftplugin/bst.vim index 2539a109..26555cc7 100644 --- a/ftplugin/bst.vim +++ b/ftplugin/bst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/bst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bst') == -1 " Vim filetype plugin file " Language: bst @@ -22,5 +17,3 @@ setlocal comments=:% setlocal fo-=t fo+=croql let b:undo_ftplugin = "setlocal com< cms< fo<" - -endif diff --git a/ftplugin/bzl.vim b/ftplugin/bzl.vim index 69c95d1d..71b7ceaa 100644 --- a/ftplugin/bzl.vim +++ b/ftplugin/bzl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/bzl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('bzl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'bzl') == -1 " Vim filetype plugin file " Language: Bazel (http://bazel.io) @@ -101,5 +96,3 @@ endfunction let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/caddyfile.vim b/ftplugin/caddyfile.vim index f9725ee2..206ed69e 100644 --- a/ftplugin/caddyfile.vim +++ b/ftplugin/caddyfile.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/caddyfile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('caddyfile', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'caddyfile') == -1 " Language: Caddyfile " Author: Josh Glendenning <josh@isobit.io> @@ -31,5 +26,3 @@ else let g:NERDCustomDelimiters = {'caddyfile': s:delimiters} endif unlet s:delimiters - -endif diff --git a/ftplugin/calendar.vim b/ftplugin/calendar.vim index 12f84394..73262759 100644 --- a/ftplugin/calendar.vim +++ b/ftplugin/calendar.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/calendar.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('calendar', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'calendar') == -1 " Vim filetype plugin file " Language: calendar(1) input file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/cdrdaoconf.vim b/ftplugin/cdrdaoconf.vim index f048ef9f..1f6fccdf 100644 --- a/ftplugin/cdrdaoconf.vim +++ b/ftplugin/cdrdaoconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cdrdaoconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cdrdaoconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cdrdaoconf') == -1 " Vim filetype plugin file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> @@ -25,5 +20,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/cfg.vim b/ftplugin/cfg.vim index 6ed841bb..2291a269 100644 --- a/ftplugin/cfg.vim +++ b/ftplugin/cfg.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cfg.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cfg', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cfg') == -1 " Vim filetype plugin file " Language: Configuration File @@ -26,5 +21,3 @@ setlocal commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ch.vim b/ftplugin/ch.vim index cd71d7ec..95865364 100644 --- a/ftplugin/ch.vim +++ b/ftplugin/ch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ch', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ch') == -1 " Vim filetype plugin file " Language: Ch @@ -24,5 +19,3 @@ endif " Behaves just like C runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim - -endif diff --git a/ftplugin/clojure.vim b/ftplugin/clojure.vim index 6862f35d..641aaac1 100644 --- a/ftplugin/clojure.vim +++ b/ftplugin/clojure.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/clojure.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('clojure', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'clojure') == -1 " Vim filetype plugin file " Language: Clojure @@ -102,5 +97,3 @@ let &cpo = s:cpo_save unlet! s:cpo_save s:setting s:dir " vim:sts=8:sw=8:ts=8:noet - -endif diff --git a/ftplugin/cobol.vim b/ftplugin/cobol.vim index 1441dfb0..89bb817a 100644 --- a/ftplugin/cobol.vim +++ b/ftplugin/cobol.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cobol.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cobol', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cobol') == -1 " Vim filetype plugin file " Language: cobol @@ -276,5 +271,3 @@ function! s:toend(direction) exe "keepjumps ".keep endif endfunction - -endif diff --git a/ftplugin/coffee.vim b/ftplugin/coffee.vim index 84fa245c..9a493b96 100644 --- a/ftplugin/coffee.vim +++ b/ftplugin/coffee.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/coffee.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 " Language: CoffeeScript " Maintainer: Mick Koch <mick@kochm.co> @@ -412,5 +407,3 @@ command! -buffer -range=% -bar -nargs=* CoffeeRun \ call s:CoffeeRun(<line1>, <line2>, <q-args>) command! -buffer -range=% -bang -bar -nargs=* CoffeeLint \ call s:CoffeeLint(<line1>, <line2>, <q-bang>, <q-args>) - -endif diff --git a/ftplugin/conf.vim b/ftplugin/conf.vim index 244827cb..8ba8a0bd 100644 --- a/ftplugin/conf.vim +++ b/ftplugin/conf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/conf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('conf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'conf') == -1 " Vim filetype plugin file " Language: generic configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/config.vim b/ftplugin/config.vim index dbd82347..dd85e65d 100644 --- a/ftplugin/config.vim +++ b/ftplugin/config.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/config.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('config', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'config') == -1 " Vim filetype plugin file " Language: config @@ -49,5 +44,3 @@ let b:undo_ftplugin = "unlet! b:browsefilter | " . b:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/crm.vim b/ftplugin/crm.vim index 0ca01cd8..46388ca1 100644 --- a/ftplugin/crm.vim +++ b/ftplugin/crm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/crm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crm') == -1 " Vim filetype plugin file " Language: CRM114 @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/cryptol/folding.vim b/ftplugin/cryptol/folding.vim index 1dcdc109..717ecadb 100644 --- a/ftplugin/cryptol/folding.vim +++ b/ftplugin/cryptol/folding.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cryptol/folding.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cryptol', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cryptol') == -1 " Copyright © 2013 Edward O'Callaghan. All Rights Reserved. @@ -53,5 +48,3 @@ function! GetPotionFold(lnum) return '>' . next_indent endif endfunction - -endif diff --git a/ftplugin/crystal.vim b/ftplugin/crystal.vim index 5f4e981b..7f391434 100644 --- a/ftplugin/crystal.vim +++ b/ftplugin/crystal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/crystal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 if exists('b:did_ftplugin') finish @@ -90,5 +85,3 @@ if exists('g:AutoPairsLoaded') endif " vim: sw=2 sts=2 et: - -endif diff --git a/ftplugin/cs.vim b/ftplugin/cs.vim index 9ee46231..cfefde11 100644 --- a/ftplugin/cs.vim +++ b/ftplugin/cs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cs') == -1 " Vim filetype plugin file " Language: C# @@ -36,5 +31,3 @@ endif let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/ftplugin/csc.vim b/ftplugin/csc.vim index b0648a81..a596b93d 100644 --- a/ftplugin/csc.vim +++ b/ftplugin/csc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/csc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('csc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csc') == -1 " Vim filetype plugin file " Language: csc @@ -34,5 +29,3 @@ let b:undo_ftplugin = "unlet! b:match_words" " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/css.vim b/ftplugin/css.vim index 50d8f714..6c8a3562 100644 --- a/ftplugin/css.vim +++ b/ftplugin/css.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/css.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('css', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'css') == -1 " Vim filetype plugin file " Language: CSS @@ -31,5 +26,3 @@ let &l:include = '^\s*@import\s\+\%(url(\)\=' let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/csv.vim b/ftplugin/csv.vim index 40d5f95c..f479a6ff 100644 --- a/ftplugin/csv.vim +++ b/ftplugin/csv.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/csv.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('csv', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'csv') == -1 " Filetype plugin for editing CSV files. "{{{1 " Author: Christian Brabandt <cb@256bit.org> @@ -41,5 +36,3 @@ unlet s:cpo_save " Vim Modeline " {{{2 " vim: set foldmethod=marker et sw=0 sts=-1 ts=4: - -endif diff --git a/ftplugin/cucumber.vim b/ftplugin/cucumber.vim index 94246791..ab1e52fa 100644 --- a/ftplugin/cucumber.vim +++ b/ftplugin/cucumber.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cucumber.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cucumber', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cucumber') == -1 " Vim filetype plugin " Language: Cucumber @@ -157,5 +152,3 @@ let &cpo = s:keepcpo unlet s:keepcpo " vim:set sts=2 sw=2: - -endif diff --git a/ftplugin/cvsrc.vim b/ftplugin/cvsrc.vim index 84d059d7..a8049142 100644 --- a/ftplugin/cvsrc.vim +++ b/ftplugin/cvsrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/cvsrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('cvsrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'cvsrc') == -1 " Vim filetype plugin file " Language: cvs(1) RC file @@ -26,5 +21,3 @@ setlocal comments= commentstring= formatoptions-=tcroql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/dart.vim b/ftplugin/dart.vim index 52ac5bae..b402543d 100644 --- a/ftplugin/dart.vim +++ b/ftplugin/dart.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dart.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dart', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dart') == -1 if exists('b:did_ftplugin') finish @@ -37,5 +32,3 @@ setlocal isfname+=: setlocal iskeyword+=$ let b:undo_ftplugin = 'setl et< fo< sw< sts< com< cms< inex< isf<' - -endif diff --git a/ftplugin/debchangelog.vim b/ftplugin/debchangelog.vim index ba8b046b..13904dc9 100644 --- a/ftplugin/debchangelog.vim +++ b/ftplugin/debchangelog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/debchangelog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('debchangelog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'debchangelog') == -1 " Vim filetype plugin file (GUI menu, folding and completion) " Language: Debian Changelog @@ -390,5 +385,3 @@ setlocal omnifunc=DebCompleteBugs " }}} " vim: set foldmethod=marker: - -endif diff --git a/ftplugin/debcontrol.vim b/ftplugin/debcontrol.vim index 767fbb8f..e6109e73 100644 --- a/ftplugin/debcontrol.vim +++ b/ftplugin/debcontrol.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/debcontrol.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('debcontrol', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'debcontrol') == -1 " Vim filetype plugin file (GUI menu and folding) " Language: Debian control files @@ -77,5 +72,3 @@ function! DebControlFold(l) endfunction " }}}1 - -endif diff --git a/ftplugin/denyhosts.vim b/ftplugin/denyhosts.vim index 35f1245b..41a54a12 100644 --- a/ftplugin/denyhosts.vim +++ b/ftplugin/denyhosts.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/denyhosts.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('denyhosts', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'denyhosts') == -1 " Vim filetype plugin file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> @@ -25,5 +20,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/dhall.vim b/ftplugin/dhall.vim index 76a6bd22..d0a702ea 100644 --- a/ftplugin/dhall.vim +++ b/ftplugin/dhall.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dhall.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dhall', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dhall') == -1 if exists('b:dhall_ftplugin') finish @@ -50,5 +45,3 @@ if exists('g:dhall_format') endif au BufNewFile,BufRead *.dhall setl shiftwidth=2 - -endif diff --git a/ftplugin/dictconf.vim b/ftplugin/dictconf.vim index 2b5467ce..048a4918 100644 --- a/ftplugin/dictconf.vim +++ b/ftplugin/dictconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dictconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dictconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dictconf') == -1 " Vim filetype plugin file " Language: dict(1) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/dictdconf.vim b/ftplugin/dictdconf.vim index 2d404814..6b3c1174 100644 --- a/ftplugin/dictdconf.vim +++ b/ftplugin/dictdconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dictdconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dictdconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dictdconf') == -1 " Vim filetype plugin file " Language: dictd(8) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/diff.vim b/ftplugin/diff.vim index d6ff42bc..7a04c881 100644 --- a/ftplugin/diff.vim +++ b/ftplugin/diff.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/diff.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('diff', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'diff') == -1 " Vim filetype plugin file " Language: Diff @@ -25,5 +20,3 @@ setlocal nomodeline " If there are comments they start with # let &commentstring = "# %s" - -endif diff --git a/ftplugin/dircolors.vim b/ftplugin/dircolors.vim index 9043b649..1ae60648 100644 --- a/ftplugin/dircolors.vim +++ b/ftplugin/dircolors.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dircolors.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dircolors', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dircolors') == -1 " Vim filetype plugin file " Language: dircolors(1) input file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/docker-compose.vim b/ftplugin/docker-compose.vim index df33d6fd..89cc8647 100644 --- a/ftplugin/docker-compose.vim +++ b/ftplugin/docker-compose.vim @@ -1,16 +1,9 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/docker-compose.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('docker-compose', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'docker-compose') == -1 " Define comment string setlocal commentstring=#\ %s " Enable automatic comment insertion setlocal formatoptions+=cro - -endif diff --git a/ftplugin/dockerfile.vim b/ftplugin/dockerfile.vim index 950a48bc..62d99f39 100644 --- a/ftplugin/dockerfile.vim +++ b/ftplugin/dockerfile.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dockerfile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dockerfile', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dockerfile') == -1 " Vim filetype plugin " Language: Dockerfile @@ -23,5 +18,3 @@ let b:did_ftplugin = 1 let b:undo_ftplugin = "setl commentstring<" setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/dosbatch.vim b/ftplugin/dosbatch.vim index ada06865..902ed8f7 100644 --- a/ftplugin/dosbatch.vim +++ b/ftplugin/dosbatch.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dosbatch.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dosbatch', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dosbatch') == -1 " Vim filetype plugin file " Language: MS-DOS .bat files @@ -47,5 +42,3 @@ let b:undo_ftplugin = "setlocal comments< formatoptions< keywordprg<" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/dosini.vim b/ftplugin/dosini.vim index 1a841bf6..394b98bd 100644 --- a/ftplugin/dosini.vim +++ b/ftplugin/dosini.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dosini.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dosini', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dosini') == -1 " Vim filetype plugin file " Language: Configuration File (ini file) for MSDOS/MS Windows @@ -26,5 +21,3 @@ setlocal comments=:; commentstring=;\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/dtd.vim b/ftplugin/dtd.vim index 26ad5061..d428a845 100644 --- a/ftplugin/dtd.vim +++ b/ftplugin/dtd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dtd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('dtd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'dtd') == -1 " Vim filetype plugin file " Language: dtd @@ -47,5 +42,3 @@ let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" . " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/dune.vim b/ftplugin/dune.vim index fde69ca6..4454e1d2 100644 --- a/ftplugin/dune.vim +++ b/ftplugin/dune.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/dune.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 if exists("b:did_ftplugin") finish @@ -17,5 +12,3 @@ set lisp " Comment string setl commentstring=;\ %s setl comments=:; - -endif diff --git a/ftplugin/ecrystal.vim b/ftplugin/ecrystal.vim index d4854095..5057546d 100644 --- a/ftplugin/ecrystal.vim +++ b/ftplugin/ecrystal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ecrystal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('crystal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'crystal') == -1 " Filetype plugin for https://crystal-lang.org/api/0.35.1/ECR.html if exists('b:did_ftplugin') @@ -104,5 +99,3 @@ let b:undo_ftplugin = 'setlocal comments< commentstring< shiftwidth<' . \ '| unlet! b:browsefilter b:match_words ' . \ '| unlet! b:AutoPairs ' . \ '| ' . s:undo_ftplugin - -endif diff --git a/ftplugin/eelixir.vim b/ftplugin/eelixir.vim index 764ded0d..914a5d70 100644 --- a/ftplugin/eelixir.vim +++ b/ftplugin/eelixir.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/eelixir.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists("b:did_ftplugin") finish @@ -114,5 +109,3 @@ let b:undo_ftplugin = "setl cms< " . \ " | unlet! b:browsefilter b:match_words | " . s:undo_ftplugin let &cpo = s:save_cpo - -endif diff --git a/ftplugin/elinks.vim b/ftplugin/elinks.vim index ed6cdd68..ca68f847 100644 --- a/ftplugin/elinks.vim +++ b/ftplugin/elinks.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/elinks.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elinks', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elinks') == -1 " Vim filetype plugin file " Language: elinks(1) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/elixir.vim b/ftplugin/elixir.vim index db05c990..d16a45d8 100644 --- a/ftplugin/elixir.vim +++ b/ftplugin/elixir.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/elixir.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('elixir', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'elixir') == -1 if exists('b:did_ftplugin') finish @@ -58,5 +53,3 @@ onoremap <buffer> <silent> <expr> [] ':silent keeppatterns ?'.b:block_end .'<CR let b:undo_ftplugin = 'setlocal sw< sts< et< isk< com< cms< path< inex< sua< def< fo<'. \ '| unlet! b:match_ignorecase b:match_words b:block_begin b:block_end' - -endif diff --git a/ftplugin/embeddedpuppet.vim b/ftplugin/embeddedpuppet.vim index c369e5c3..344e93ae 100644 --- a/ftplugin/embeddedpuppet.vim +++ b/ftplugin/embeddedpuppet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/embeddedpuppet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 " Vim filetype plugin " Language: embedded puppet @@ -82,5 +77,3 @@ let b:undo_ftplugin = "setl cms< " let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/ember-script.vim b/ftplugin/ember-script.vim index 41f53442..792e3886 100644 --- a/ftplugin/ember-script.vim +++ b/ftplugin/ember-script.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ember-script.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('emberscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emberscript') == -1 " Language: ember-script " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com>> @@ -28,5 +23,3 @@ else endif setlocal comments=:# setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/emblem.vim b/ftplugin/emblem.vim index 655c843b..3351f533 100644 --- a/ftplugin/emblem.vim +++ b/ftplugin/emblem.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/emblem.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('emblem', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'emblem') == -1 " Language: emblem " Maintainer: Yulij Andreevich Lesov <yalesov@gmail.com> @@ -24,5 +19,3 @@ setlocal smartindent setlocal formatoptions=q setlocal comments=:/ setlocal commentstring=/\ %s - -endif diff --git a/ftplugin/eruby.vim b/ftplugin/eruby.vim index 3dc549ed..f6a8e659 100644 --- a/ftplugin/eruby.vim +++ b/ftplugin/eruby.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/eruby.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim filetype plugin " Language: eRuby @@ -138,5 +133,3 @@ function! ErubyAtCursor() abort endfunction " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/ftplugin/eterm.vim b/ftplugin/eterm.vim index 135d75f8..fc163ccf 100644 --- a/ftplugin/eterm.vim +++ b/ftplugin/eterm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/eterm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('eterm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'eterm') == -1 " Vim filetype plugin file " Language: eterm(1) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/falcon.vim b/ftplugin/falcon.vim index d278f58c..5eeab00f 100644 --- a/ftplugin/falcon.vim +++ b/ftplugin/falcon.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/falcon.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('falcon', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'falcon') == -1 " Vim filetype plugin file " Language: Falcon @@ -56,5 +51,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: set sw=4 sts=4 et tw=80 : - -endif diff --git a/ftplugin/fennel.vim b/ftplugin/fennel.vim index 5fb9afb6..926bc879 100644 --- a/ftplugin/fennel.vim +++ b/ftplugin/fennel.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/fennel.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fennel', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fennel') == -1 " Vim filetype plugin file " Language: FENNEL @@ -33,5 +28,3 @@ setlocal comments=n:; setlocal commentstring=;\ %s let &cpo = s:cpo_save - -endif diff --git a/ftplugin/fetchmail.vim b/ftplugin/fetchmail.vim index a995bdfd..eaaf3e25 100644 --- a/ftplugin/fetchmail.vim +++ b/ftplugin/fetchmail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/fetchmail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fetchmail', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fetchmail') == -1 " Vim filetype plugin file " Language: fetchmail(1) RC File @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/fish.vim b/ftplugin/fish.vim index e79c0669..8ead1ce3 100644 --- a/ftplugin/fish.vim +++ b/ftplugin/fish.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/fish.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fish', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fish') == -1 setlocal comments=:# setlocal commentstring=#%s @@ -45,5 +40,3 @@ let b:match_words = let b:endwise_addition = 'end' let b:endwise_words = 'begin,function,if,switch,while,for' let b:endwise_syngroups = 'fishKeyword,fishConditional,fishRepeat' - -endif diff --git a/ftplugin/fortran.vim b/ftplugin/fortran.vim index 4c7d7cdf..b951347c 100644 --- a/ftplugin/fortran.vim +++ b/ftplugin/fortran.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/fortran.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fortran', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fortran') == -1 " Vim settings file " Language: Fortran 2008 (and older: Fortran 2003, 95, 90, 77, 66) @@ -140,5 +135,3 @@ let &cpoptions=s:cposet unlet s:cposet " vim:sw=2 - -endif diff --git a/ftplugin/framescript.vim b/ftplugin/framescript.vim index 4ad99bf3..514f3c94 100644 --- a/ftplugin/framescript.vim +++ b/ftplugin/framescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/framescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('framescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'framescript') == -1 " Vim ftplugin file " Language: FrameScript @@ -37,5 +32,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/fvwm.vim b/ftplugin/fvwm.vim index 201a28b5..0f6de2db 100644 --- a/ftplugin/fvwm.vim +++ b/ftplugin/fvwm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/fvwm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('fvwm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'fvwm') == -1 " Created : Tue 09 May 2006 02:07:31 PM CDT " Modified : Tue 09 May 2006 02:07:31 PM CDT @@ -21,5 +16,3 @@ let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql - -endif diff --git a/ftplugin/gdb.vim b/ftplugin/gdb.vim index 1f4ed1a8..03fe2565 100644 --- a/ftplugin/gdb.vim +++ b/ftplugin/gdb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gdb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gdb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gdb') == -1 " Vim filetype plugin file " Language: gdb @@ -19,5 +14,3 @@ setlocal commentstring=#%s " Undo the stuff we changed. let b:undo_ftplugin = "setlocal cms<" - -endif diff --git a/ftplugin/git.vim b/ftplugin/git.vim index 78352e84..13ae96b6 100644 --- a/ftplugin/git.vim +++ b/ftplugin/git.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/git.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim filetype plugin " Language: generic git output @@ -48,5 +43,3 @@ endif setlocal includeexpr=substitute(v:fname,'^[^/]\\+/','','') let b:undo_ftplugin = "setl keywordprg< path< includeexpr<" - -endif diff --git a/ftplugin/gitcommit.vim b/ftplugin/gitcommit.vim index cc5c4208..47f82b17 100644 --- a/ftplugin/gitcommit.vim +++ b/ftplugin/gitcommit.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gitcommit.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim filetype plugin " Language: git commit file @@ -74,5 +69,3 @@ function! s:gitdiffcached(bang,gitdir,...) nnoremap <buffer> <silent> q :q<CR> setlocal buftype=nowrite nobuflisted noswapfile nomodifiable filetype=git endfunction - -endif diff --git a/ftplugin/gitconfig.vim b/ftplugin/gitconfig.vim index f9a935d9..44f66a29 100644 --- a/ftplugin/gitconfig.vim +++ b/ftplugin/gitconfig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gitconfig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim filetype plugin " Language: git config file @@ -22,5 +17,3 @@ setlocal formatoptions-=t formatoptions+=croql setlocal comments=:#,:; commentstring=;\ %s let b:undo_ftplugin = "setl fo< com< cms<" - -endif diff --git a/ftplugin/gitignore.vim b/ftplugin/gitignore.vim index ce45c58f..48495472 100644 --- a/ftplugin/gitignore.vim +++ b/ftplugin/gitignore.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gitignore.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gitignore', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gitignore') == -1 scriptencoding utf-8 @@ -23,5 +18,3 @@ setlocal commentstring=#\ %s let b:undo_ftplugin = 'setlocal commentstring<' " vim: ts=2 et sw=2 - -endif diff --git a/ftplugin/gitrebase.vim b/ftplugin/gitrebase.vim index 8e217806..c07554e0 100644 --- a/ftplugin/gitrebase.vim +++ b/ftplugin/gitrebase.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gitrebase.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim filetype plugin " Language: git rebase --interactive @@ -55,5 +50,3 @@ nnoremap <buffer> <silent> <C-A> :<C-U><C-R>=v:count1<CR>Cycle<CR> nnoremap <buffer> <silent> <C-X> :<C-U><C-R>=v:count1<CR>Cycle!<CR> let b:undo_ftplugin = b:undo_ftplugin . "|exe 'nunmap <buffer> K'|exe 'nunmap <buffer> <C-A>'|exe 'nunmap <buffer> <C-X>'" - -endif diff --git a/ftplugin/gitsendemail.vim b/ftplugin/gitsendemail.vim index 1ef62bd3..a8e26995 100644 --- a/ftplugin/gitsendemail.vim +++ b/ftplugin/gitsendemail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gitsendemail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('git', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Vim filetype plugin " Language: git send-email message @@ -13,5 +8,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'git') == -1 " Last Change: 2009 Dec 24 runtime! ftplugin/mail.vim - -endif diff --git a/ftplugin/gpg.vim b/ftplugin/gpg.vim index 8d142e8b..9089768c 100644 --- a/ftplugin/gpg.vim +++ b/ftplugin/gpg.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/gpg.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('gpg', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'gpg') == -1 " Vim filetype plugin file " Language: gpg(1) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/graphql.vim b/ftplugin/graphql.vim index 6a3cbf30..56b29f89 100644 --- a/ftplugin/graphql.vim +++ b/ftplugin/graphql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/graphql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('graphql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'graphql') == -1 " Copyright (c) 2016-2020 Jon Parise <jon@indelible.org> " @@ -44,5 +39,3 @@ setlocal shiftwidth=2 setlocal expandtab let b:undo_ftplugin = 'setlocal com< cms< fo< isk< sts< sw< et<' - -endif diff --git a/ftplugin/groovy.vim b/ftplugin/groovy.vim index ae879781..cf78a14e 100644 --- a/ftplugin/groovy.vim +++ b/ftplugin/groovy.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/groovy.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('groovy', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'groovy') == -1 " Vim filetype plugin file " Language: groovy @@ -26,5 +21,3 @@ setlocal commentstring=//%s let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/group.vim b/ftplugin/group.vim index 92aa848f..357f43cf 100644 --- a/ftplugin/group.vim +++ b/ftplugin/group.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/group.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('group', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'group') == -1 " Vim filetype plugin file " Language: group(5) user group file @@ -26,5 +21,3 @@ setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/grub.vim b/ftplugin/grub.vim index fe1a3fbd..d707032b 100644 --- a/ftplugin/grub.vim +++ b/ftplugin/grub.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/grub.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('grub', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'grub') == -1 " Vim filetype plugin file " Language: grub(8) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/haml.vim b/ftplugin/haml.vim index c262cc3a..95b57af6 100644 --- a/ftplugin/haml.vim +++ b/ftplugin/haml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/haml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('haml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'haml') == -1 " Vim filetype plugin " Language: Haml @@ -78,5 +73,3 @@ let &cpo = s:save_cpo unlet s:save_cpo " vim:set sw=2: - -endif diff --git a/ftplugin/hamster.vim b/ftplugin/hamster.vim index 341a762d..78077433 100644 --- a/ftplugin/hamster.vim +++ b/ftplugin/hamster.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hamster.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hamster', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hamster') == -1 " Vim filetype plugin " Language: Hamster Script @@ -69,5 +64,3 @@ setlocal ignorecase let &cpo = s:cpo_save unlet s:cpo_save setlocal cpo+=M " makes \%( match \) - -endif diff --git a/ftplugin/handlebars.vim b/ftplugin/handlebars.vim index 2dfb1aeb..0ebcc9b7 100644 --- a/ftplugin/handlebars.vim +++ b/ftplugin/handlebars.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/handlebars.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('handlebars', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'handlebars') == -1 if exists('b:loaded_mustache_handlebars') finish @@ -130,5 +125,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: nofoldenable - -endif diff --git a/ftplugin/hcl.vim b/ftplugin/hcl.vim index 1c5a830a..8c55f9a5 100644 --- a/ftplugin/hcl.vim +++ b/ftplugin/hcl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hcl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hcl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hcl') == -1 " File: ftplugin/hcl.vim " Author: BABAROT <b4b4r07@gmail.com> @@ -44,5 +39,3 @@ let &cpo = s:save_cpo unlet s:save_cpo " vim: set et sw=4 ts=4: - -endif diff --git a/ftplugin/help.vim b/ftplugin/help.vim index b320d73a..dcb63826 100644 --- a/ftplugin/help.vim +++ b/ftplugin/help.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/help.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('help', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'help') == -1 " Vim filetype plugin file " Language: Vim help file @@ -104,5 +99,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/hgcommit.vim b/ftplugin/hgcommit.vim index fbcf6143..d101a625 100644 --- a/ftplugin/hgcommit.vim +++ b/ftplugin/hgcommit.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hgcommit.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hgcommit', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hgcommit') == -1 " Vim filetype plugin file " Language: hg (Mercurial) commit file @@ -23,5 +18,3 @@ let b:did_ftplugin = 1 setlocal nomodeline let b:undo_ftplugin = 'setl modeline<' - -endif diff --git a/ftplugin/hive.vim b/ftplugin/hive.vim index f5884dd8..e1fe2dff 100644 --- a/ftplugin/hive.vim +++ b/ftplugin/hive.vim @@ -1,13 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hive.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hive', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hive') == -1 setlocal comments=:-- setlocal commentstring=--\ %s - -endif diff --git a/ftplugin/hog.vim b/ftplugin/hog.vim index edceb700..4b198d70 100644 --- a/ftplugin/hog.vim +++ b/ftplugin/hog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hog') == -1 " Vim filetype plugin " Language: hog (snort.conf) @@ -46,5 +41,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/hostconf.vim b/ftplugin/hostconf.vim index badef7ee..bb680b8e 100644 --- a/ftplugin/hostconf.vim +++ b/ftplugin/hostconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hostconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hostconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hostconf') == -1 " Vim filetype plugin file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> @@ -25,5 +20,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/hostsaccess.vim b/ftplugin/hostsaccess.vim index 60216fac..1617577b 100644 --- a/ftplugin/hostsaccess.vim +++ b/ftplugin/hostsaccess.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/hostsaccess.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('hostsaccess', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'hostsaccess') == -1 " Vim filetype plugin file " Language: hosts_access(5) control file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/html.vim b/ftplugin/html.vim index df1e6a28..b48d0cd7 100644 --- a/ftplugin/html.vim +++ b/ftplugin/html.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/html.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('html', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'html') == -1 " Vim filetype plugin file " Language: html @@ -58,5 +53,3 @@ let b:undo_ftplugin = "setlocal commentstring< matchpairs< omnifunc< comments< f " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/htmldjango.vim b/ftplugin/htmldjango.vim index 3e512e67..6da812a4 100644 --- a/ftplugin/htmldjango.vim +++ b/ftplugin/htmldjango.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/htmldjango.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('htmldjango', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'htmldjango') == -1 " Vim filetype plugin file " Language: Django HTML template @@ -20,5 +15,3 @@ endif " Use HTML and Django template ftplugins. runtime! ftplugin/html.vim runtime! ftplugin/django.vim - -endif diff --git a/ftplugin/i3config.vim b/ftplugin/i3config.vim index 36b8b8f9..dc4182fb 100644 --- a/ftplugin/i3config.vim +++ b/ftplugin/i3config.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/i3config.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('i3', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'i3') == -1 setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/idris.vim b/ftplugin/idris.vim index 9827033b..f3201a08 100644 --- a/ftplugin/idris.vim +++ b/ftplugin/idris.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/idris.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('idris', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris') == -1 if bufname('%') == "idris-response" finish @@ -349,5 +344,3 @@ menu Idris.Proof\ Search\ with\ hints <LocalLeader>p au BufHidden idris-response call IdrisHideResponseWin() au BufEnter idris-response call IdrisShowResponseWin() - -endif diff --git a/ftplugin/idris2.vim b/ftplugin/idris2.vim index 89395311..97337057 100644 --- a/ftplugin/idris2.vim +++ b/ftplugin/idris2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/idris2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('idris2', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'idris2') == -1 if bufname('%') == "idris-response" finish @@ -337,5 +332,3 @@ menu Idris.Proof\ Search\ with\ hints <LocalLeader>p au BufHidden idris-response call IdrisHideResponseWin() au BufEnter idris-response call IdrisShowResponseWin() - -endif diff --git a/ftplugin/indent.vim b/ftplugin/indent.vim index 5a0d6c35..d3ee4f74 100644 --- a/ftplugin/indent.vim +++ b/ftplugin/indent.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/indent.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('indent', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'indent') == -1 " Vim filetype plugin file " Language: indent(1) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ion.vim b/ftplugin/ion.vim index 9db5c7a2..8835e291 100644 --- a/ftplugin/ion.vim +++ b/ftplugin/ion.vim @@ -1,16 +1,9 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ion.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ion', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ion') == -1 if exists("b:did_ftplugin") | finish | endif let b:did_ftplugin = 1 setlocal commentstring=#%s - -endif diff --git a/ftplugin/j.vim b/ftplugin/j.vim index 577cbd9d..4b4669ff 100644 --- a/ftplugin/j.vim +++ b/ftplugin/j.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/j.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('j', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'j') == -1 " Vim filetype plugin " Language: J @@ -88,5 +83,3 @@ endif let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/java.vim b/ftplugin/java.vim index 82953812..5a7dc9e0 100644 --- a/ftplugin/java.vim +++ b/ftplugin/java.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/java.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('java', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'java') == -1 " Vim filetype plugin file " Language: Java @@ -58,5 +53,3 @@ let b:undo_ftplugin = "setlocal suffixes< suffixesadd<" . " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/jproperties.vim b/ftplugin/jproperties.vim index 5839c997..b67a00c3 100644 --- a/ftplugin/jproperties.vim +++ b/ftplugin/jproperties.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/jproperties.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jproperties', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jproperties') == -1 " Vim filetype plugin " Language: Java properties file @@ -22,5 +17,3 @@ setlocal comments=:#,:! setlocal commentstring=#\ %s let b:undo_ftplugin = "setl cms< com< fo<" - -endif diff --git a/ftplugin/jq.vim b/ftplugin/jq.vim index fab7f20f..ae05d442 100644 --- a/ftplugin/jq.vim +++ b/ftplugin/jq.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/jq.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jq', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jq') == -1 setlocal commentstring=#%s - -endif diff --git a/ftplugin/json.vim b/ftplugin/json.vim index 9b2d9056..f55b4b0a 100644 --- a/ftplugin/json.vim +++ b/ftplugin/json.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/json.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('json', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'json') == -1 " Vim syntax file " Language: JSON @@ -45,5 +40,3 @@ if has('conceal') "maybe g:vim_json_syntax_conceal could be settable to 0,1,2 to map "directly to vim's conceallevels? unsure if anyone cares endif - -endif diff --git a/ftplugin/jsonnet.vim b/ftplugin/jsonnet.vim index 4c35558e..00dcfb7c 100644 --- a/ftplugin/jsonnet.vim +++ b/ftplugin/jsonnet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/jsonnet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jsonnet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsonnet') == -1 @@ -16,5 +11,3 @@ command! -nargs=0 JsonnetFmt call jsonnet#Format() setlocal commentstring=//\ %s - -endif diff --git a/ftplugin/jsp.vim b/ftplugin/jsp.vim index 9e186dc5..68e9e03b 100644 --- a/ftplugin/jsp.vim +++ b/ftplugin/jsp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/jsp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('jsp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'jsp') == -1 " Vim filetype plugin file " Language: jsp @@ -74,5 +69,3 @@ let b:undo_ftplugin = "unlet! b:browsefilter b:match_words | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/julia.vim b/ftplugin/julia.vim index 48845421..cc353099 100644 --- a/ftplugin/julia.vim +++ b/ftplugin/julia.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/julia.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('julia', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 " Vim filetype plugin file " Language: Julia @@ -122,5 +117,3 @@ let b:undo_ftplugin .= " | delcommand JuliaDoc | delcommand JuliaDocKeywordprg" let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/juliadoc.vim b/ftplugin/juliadoc.vim index 9212e287..d961f697 100644 --- a/ftplugin/juliadoc.vim +++ b/ftplugin/juliadoc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/juliadoc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('julia', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'julia') == -1 " Vim filetype plugin file " Language: Julia document @@ -37,5 +32,3 @@ let b:undo_ftplugin .= " | delcommand JuliaDoc | delcommand JuliaDocKeywordprg" let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/kconfig.vim b/ftplugin/kconfig.vim index 970e4abe..a02b473a 100644 --- a/ftplugin/kconfig.vim +++ b/ftplugin/kconfig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/kconfig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kconfig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kconfig') == -1 " Vim filetype plugin file " Vim syntax file @@ -34,5 +29,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/kotlin.vim b/ftplugin/kotlin.vim index a9eb39cf..5e04d995 100644 --- a/ftplugin/kotlin.vim +++ b/ftplugin/kotlin.vim @@ -1,16 +1,9 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/kotlin.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kotlin', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kotlin') == -1 if exists('b:did_ftplugin') | finish | endif let b:did_ftplugin = 1 setlocal comments=:// setlocal commentstring=//\ %s - -endif diff --git a/ftplugin/kwt.vim b/ftplugin/kwt.vim index 49953976..2a546459 100644 --- a/ftplugin/kwt.vim +++ b/ftplugin/kwt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/kwt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('kwt', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'kwt') == -1 " Vim filetype plugin file " Language: Kimwitu++ @@ -39,5 +34,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ld.vim b/ftplugin/ld.vim index 1b9730d9..a748663c 100644 --- a/ftplugin/ld.vim +++ b/ftplugin/ld.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ld.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ld', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ld') == -1 " Vim filetype plugin file " Language: ld(1) script @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/less.vim b/ftplugin/less.vim index 1eabb7b3..87b66ecf 100644 --- a/ftplugin/less.vim +++ b/ftplugin/less.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/less.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('less', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'less') == -1 " Vim filetype plugin " Language: less @@ -27,5 +22,3 @@ setlocal comments=:// commentstring=//\ %s setlocal omnifunc=csscomplete#CompleteCSS setlocal suffixesadd=.less - -endif diff --git a/ftplugin/lftp.vim b/ftplugin/lftp.vim index 4f246ecd..0088fab0 100644 --- a/ftplugin/lftp.vim +++ b/ftplugin/lftp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/lftp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lftp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lftp') == -1 " Vim filetype plugin file " Language: lftp(1) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/libao.vim b/ftplugin/libao.vim index 154ac0ce..9829dfa1 100644 --- a/ftplugin/libao.vim +++ b/ftplugin/libao.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/libao.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('libao', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'libao') == -1 " Vim filetype plugin file " Language: libao.conf(5) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/lilypond.vim b/ftplugin/lilypond.vim index 0f19b5cf..21b38497 100644 --- a/ftplugin/lilypond.vim +++ b/ftplugin/lilypond.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/lilypond.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lilypond', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lilypond') == -1 " LilyPond filetype plugin " Language: LilyPond (ft=ly) @@ -64,5 +59,3 @@ setlocal dictionary-=$VIM/syntax/lilypond-words dictionary+=$VIM/syntax/lilypond setlocal complete-=k complete+=k " setlocal showmatch - -endif diff --git a/ftplugin/limits.vim b/ftplugin/limits.vim index 6990030f..82828bb2 100644 --- a/ftplugin/limits.vim +++ b/ftplugin/limits.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/limits.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('limits', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'limits') == -1 " Vim filetype plugin file " Language: limits(5) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/liquid.vim b/ftplugin/liquid.vim index 75b093b9..1b8a5d05 100644 --- a/ftplugin/liquid.vim +++ b/ftplugin/liquid.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/liquid.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('liquid', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'liquid') == -1 " Vim filetype plugin " Language: Liquid @@ -68,5 +63,3 @@ endif setlocal commentstring={%\ comment\ %}%s{%\ endcomment\ %} let b:undo_ftplugin .= 'setl cms< | unlet! b:browsefilter b:match_words' - -endif diff --git a/ftplugin/lisp.vim b/ftplugin/lisp.vim index d706128c..c6b097b1 100644 --- a/ftplugin/lisp.vim +++ b/ftplugin/lisp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/lisp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lisp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lisp') == -1 " Vim filetype plugin " Language: Lisp @@ -33,5 +28,3 @@ setl commentstring=;%s setl comments^=:;;;,:;;,sr:#\|,mb:\|,ex:\|# let b:undo_ftplugin = "setlocal comments< define< formatoptions< iskeyword< lisp< commentstring<" - -endif diff --git a/ftplugin/litcoffee.vim b/ftplugin/litcoffee.vim index 6b70fe8b..75af16cd 100644 --- a/ftplugin/litcoffee.vim +++ b/ftplugin/litcoffee.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/litcoffee.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('coffee-script', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'coffee-script') == -1 runtime ftplugin/coffee.vim - -endif diff --git a/ftplugin/llvm.vim b/ftplugin/llvm.vim index dcb43a4b..67da6358 100644 --- a/ftplugin/llvm.vim +++ b/ftplugin/llvm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/llvm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('llvm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 " Vim filetype plugin file " Language: LLVM Assembly @@ -19,5 +14,3 @@ let b:did_ftplugin = 1 setlocal softtabstop=2 shiftwidth=2 setlocal expandtab setlocal comments+=:; - -endif diff --git a/ftplugin/logcheck.vim b/ftplugin/logcheck.vim index fb90af64..c69142ae 100644 --- a/ftplugin/logcheck.vim +++ b/ftplugin/logcheck.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/logcheck.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('logcheck', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'logcheck') == -1 " Vim filetype plugin file " Language: Logcheck @@ -24,5 +19,3 @@ let b:undo_ftplugin = 'setl fo<' " Do not hard-wrap non-comment lines since each line is a self-contained " regular expression setlocal formatoptions-=t - -endif diff --git a/ftplugin/loginaccess.vim b/ftplugin/loginaccess.vim index c9834df2..5ad28b4c 100644 --- a/ftplugin/loginaccess.vim +++ b/ftplugin/loginaccess.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/loginaccess.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('loginaccess', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'loginaccess') == -1 " Vim filetype plugin file " Language: login.access(5) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/logindefs.vim b/ftplugin/logindefs.vim index 97ba09fc..5c8f91d8 100644 --- a/ftplugin/logindefs.vim +++ b/ftplugin/logindefs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/logindefs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('logindefs', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'logindefs') == -1 " Vim filetype plugin file " Language: login.defs(5) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/logtalk.vim b/ftplugin/logtalk.vim index b4b58d36..2c75d4b5 100644 --- a/ftplugin/logtalk.vim +++ b/ftplugin/logtalk.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/logtalk.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('logtalk', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'logtalk') == -1 " Logtalk filetype plugin file " Language: Logtalk @@ -26,5 +21,3 @@ setlocal fdn=10 setlocal fdc=2 setlocal autoindent setlocal dict=$VIMRUNTIME/ftplugin/logtalk.dict - -endif diff --git a/ftplugin/lprolog.vim b/ftplugin/lprolog.vim index bdd1d5b1..ca24c8d5 100644 --- a/ftplugin/lprolog.vim +++ b/ftplugin/lprolog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/lprolog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('lprolog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'lprolog') == -1 " Vim settings file " Language: LambdaProlog (Teyjus) @@ -44,5 +39,3 @@ if !exists("no_plugin_maps") && !exists("no_lprolog_maps") vnoremap <buffer> <Plug>BUncomOn <ESC>:'<,'><CR>`<O<ESC>0i/*<ESC>`>o<ESC>0i*/<ESC>`< vnoremap <buffer> <Plug>BUncomOff <ESC>:'<,'><CR>`<dd`>dd`< endif - -endif diff --git a/ftplugin/ls.vim b/ftplugin/ls.vim index eb3cc517..98542222 100644 --- a/ftplugin/ls.vim +++ b/ftplugin/ls.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ls.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('livescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'livescript') == -1 " Language: LiveScript " Maintainer: George Zahariev @@ -211,5 +206,3 @@ command! -range=% -bar -nargs=* -complete=customlist,s:LiveScriptCompileComplete \ LiveScriptCompile call s:LiveScriptCompile(<line1>, <line2>, <q-args>) " Run some LiveScript. command! -range=% -bar LiveScriptRun <line1>,<line2>:w !lsc -sp - -endif diff --git a/ftplugin/m4.vim b/ftplugin/m4.vim index 7ead0f44..51c935ae 100644 --- a/ftplugin/m4.vim +++ b/ftplugin/m4.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/m4.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('m4', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'm4') == -1 " Vim filetype plugin file " Language: m4 @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/mail.vim b/ftplugin/mail.vim index 0fd2e39d..eb2bf8b4 100644 --- a/ftplugin/mail.vim +++ b/ftplugin/mail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mail', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mail') == -1 " Vim filetype plugin file " Language: Mail @@ -45,5 +40,3 @@ if !exists("no_plugin_maps") && !exists("no_mail_maps") vnoremap <buffer> <Plug>MailQuote :s/^/> /<CR>:noh<CR>`` nnoremap <buffer> <Plug>MailQuote :.,$s/^/> /<CR>:noh<CR>`` endif - -endif diff --git a/ftplugin/mailaliases.vim b/ftplugin/mailaliases.vim index ed8ed24c..7fd68c4a 100644 --- a/ftplugin/mailaliases.vim +++ b/ftplugin/mailaliases.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mailaliases.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mailaliases', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mailaliases') == -1 " Vim filetype plugin file " Previous Maintainer: Nikolai Weibull <now@bitwi.se> @@ -25,5 +20,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/mailcap.vim b/ftplugin/mailcap.vim index c3f7d665..a47cf59c 100644 --- a/ftplugin/mailcap.vim +++ b/ftplugin/mailcap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mailcap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mailcap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mailcap') == -1 " Vim filetype plugin file " Language: Mailcap configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/make.vim b/ftplugin/make.vim index a077f521..02b0e320 100644 --- a/ftplugin/make.vim +++ b/ftplugin/make.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/make.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('make', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'make') == -1 " Vim filetype plugin file " Language: Make @@ -40,5 +35,3 @@ let &l:include = '^\s*include' if exists("loaded_matchit") let b:match_words = '^ *ifn\=\(eq\|def\)\>:^ *else\(\s\+ifn\=\(eq\|def\)\)\=\>:^ *endif\>,\<define\>:\<endef\>,^!\s*if\(n\=def\)\=\>:^!\s*else\(if\(n\=def\)\=\)\=\>:^!\s*endif\>' endif - -endif diff --git a/ftplugin/mako.vim b/ftplugin/mako.vim index 48cc40a1..c68d6d67 100644 --- a/ftplugin/mako.vim +++ b/ftplugin/mako.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mako.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mako', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mako') == -1 " Vim filetype plugin file " Language: Mako @@ -26,5 +21,3 @@ if exists("loaded_matchit") \ "<\@<=dl\>[^>]*\%(>\|$\):<\@<=d[td]\>:<\@<=/dl>," . \ "<\@<=\([^/][^ \t>]*\)[^>]*\%(>\|$\):<\@<=/\1>" endif - -endif diff --git a/ftplugin/manconf.vim b/ftplugin/manconf.vim index 34b0173b..51490f66 100644 --- a/ftplugin/manconf.vim +++ b/ftplugin/manconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/manconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('manconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'manconf') == -1 " Vim filetype plugin file " Language: man.conf(5) - man configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index 4209f306..03530bc9 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/markdown.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('markdown', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'markdown') == -1 "TODO print messages when on visual mode. I only see VISUAL, not the messages. @@ -884,5 +879,3 @@ augroup Mkd autocmd InsertEnter,InsertLeave <buffer> call s:MarkdownRefreshSyntax(0) autocmd CursorHold,CursorHoldI <buffer> call s:MarkdownRefreshSyntax(0) augroup END - -endif diff --git a/ftplugin/meson.vim b/ftplugin/meson.vim index 41daf3ee..75c9d90d 100644 --- a/ftplugin/meson.vim +++ b/ftplugin/meson.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/meson.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('meson', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'meson') == -1 " Vim filetype plugin file " Language: meson @@ -26,5 +21,3 @@ setlocal softtabstop=2 let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/ftplugin/mf.vim b/ftplugin/mf.vim index 395ebe46..06af3469 100644 --- a/ftplugin/mf.vim +++ b/ftplugin/mf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mf') == -1 " Vim filetype plugin file " Language: METAFONT @@ -77,5 +72,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/mma.vim b/ftplugin/mma.vim index c173a1a2..2dc9cd61 100644 --- a/ftplugin/mma.vim +++ b/ftplugin/mma.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mma.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mathematica', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mathematica') == -1 "Vim filetype plugin " Language: Mathematica @@ -66,5 +61,3 @@ unlet s:cpo_save "} " vim: set foldmarker={,} foldlevel=0 foldmethod=marker: - -endif diff --git a/ftplugin/modconf.vim b/ftplugin/modconf.vim index 121cf3f8..26eb4a88 100644 --- a/ftplugin/modconf.vim +++ b/ftplugin/modconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/modconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('modconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'modconf') == -1 " Vim filetype plugin file " Language: modules.conf(5) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/moon.vim b/ftplugin/moon.vim index 997facd7..a4c0140f 100644 --- a/ftplugin/moon.vim +++ b/ftplugin/moon.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/moon.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('moonscript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'moonscript') == -1 " Language: MoonScript " Maintainer: leafo <leafot@gmail.com> @@ -23,5 +18,3 @@ setlocal comments=:-- setlocal commentstring=--\ %s let b:undo_ftplugin = "setlocal commentstring< comments< formatoptions<" - -endif diff --git a/ftplugin/mp.vim b/ftplugin/mp.vim index 18d539cb..d73c51ac 100644 --- a/ftplugin/mp.vim +++ b/ftplugin/mp.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mp.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mp', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mp') == -1 " Vim filetype plugin file " Language: MetaPost @@ -89,5 +84,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/mplayerconf.vim b/ftplugin/mplayerconf.vim index 0a9a5b97..34166238 100644 --- a/ftplugin/mplayerconf.vim +++ b/ftplugin/mplayerconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mplayerconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mplayerconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mplayerconf') == -1 " Vim filetype plugin file " Language: mplayer(1) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/mrxvtrc.vim b/ftplugin/mrxvtrc.vim index 66ed311c..6af76527 100644 --- a/ftplugin/mrxvtrc.vim +++ b/ftplugin/mrxvtrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mrxvtrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('mrxvtrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'mrxvtrc') == -1 " Created : Wed 26 Apr 2006 01:20:53 AM CDT " Modified : Fri 28 Apr 2006 03:24:01 AM CDT @@ -29,5 +24,3 @@ let b:undo_ftplugin = "setl com< cms< fo<" setlocal comments=:!,:# commentstring=#\ %s setlocal formatoptions-=t formatoptions+=croql - -endif diff --git a/ftplugin/mustache.vim b/ftplugin/mustache.vim index c6d4b22d..c494c195 100644 --- a/ftplugin/mustache.vim +++ b/ftplugin/mustache.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/mustache.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('handlebars', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'handlebars') == -1 runtime! ftplugin/handlebars*.vim ftplugin/handlebars/*.vim - -endif diff --git a/ftplugin/muttrc.vim b/ftplugin/muttrc.vim index 6efb6fe2..cd4321be 100644 --- a/ftplugin/muttrc.vim +++ b/ftplugin/muttrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/muttrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('muttrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'muttrc') == -1 " Vim filetype plugin file " Language: mutt RC File @@ -29,5 +24,3 @@ let &l:include = '^\s*source\>' let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/nanorc.vim b/ftplugin/nanorc.vim index d496dbe4..f558d671 100644 --- a/ftplugin/nanorc.vim +++ b/ftplugin/nanorc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/nanorc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nanorc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nanorc') == -1 " Vim filetype plugin file " Language: nanorc(5) - GNU nano configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/neomuttrc.vim b/ftplugin/neomuttrc.vim index ef375cbd..a20c2c4d 100644 --- a/ftplugin/neomuttrc.vim +++ b/ftplugin/neomuttrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/neomuttrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('neomuttrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'neomuttrc') == -1 " Vim filetype plugin file " Language: NeoMutt RC File @@ -30,5 +25,3 @@ let &l:include = '^\s*source\>' let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/netrc.vim b/ftplugin/netrc.vim index 8f3ab865..73eeeee1 100644 --- a/ftplugin/netrc.vim +++ b/ftplugin/netrc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/netrc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('netrc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'netrc') == -1 " Vim filetype plugin file " Language: netrc(5) configuration file @@ -26,5 +21,3 @@ setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/nginx.vim b/ftplugin/nginx.vim index ac28682b..4befc51b 100644 --- a/ftplugin/nginx.vim +++ b/ftplugin/nginx.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/nginx.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nginx', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nginx') == -1 setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/nix.vim b/ftplugin/nix.vim index c54c8234..9b998729 100644 --- a/ftplugin/nix.vim +++ b/ftplugin/nix.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/nix.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nix', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nix') == -1 " Vim filetype plugin " Language: Nix @@ -28,5 +23,3 @@ if get(g:, 'nix_recommended_style', 1) \ softtabstop=2 \ expandtab endif - -endif diff --git a/ftplugin/nroff.vim b/ftplugin/nroff.vim index 2487c431..1d56daa9 100644 --- a/ftplugin/nroff.vim +++ b/ftplugin/nroff.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/nroff.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nroff', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nroff') == -1 " Vim filetype plugin " Language: roff(7) @@ -18,5 +13,3 @@ endif let b:did_ftplugin = 1 setlocal commentstring=.\\\"%s - -endif diff --git a/ftplugin/nsis.vim b/ftplugin/nsis.vim index eecf536f..697f2d67 100644 --- a/ftplugin/nsis.vim +++ b/ftplugin/nsis.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/nsis.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('nsis', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'nsis') == -1 " Vim ftplugin file " Language: NSIS script @@ -50,5 +45,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/oasis.vim b/ftplugin/oasis.vim index d8f3988c..cfe932fe 100644 --- a/ftplugin/oasis.vim +++ b/ftplugin/oasis.vim @@ -1,14 +1,7 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/oasis.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 setlocal comments=:# setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/objc.vim b/ftplugin/objc.vim index 6f690a03..2d108e5b 100644 --- a/ftplugin/objc.vim +++ b/ftplugin/objc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/objc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('objc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'objc') == -1 " Use C++ style comment strings with commentary.vim setl commentstring=//%s @@ -13,5 +8,3 @@ setl commentstring=//%s " Search for include files inside frameworks (used for gf etc.) setl includeexpr=substitute(v:fname,'\\([^/]\\+\\)/\\(.\\+\\)','/System/Library/Frameworks/\\1.framework/Headers/\\2','') - -endif diff --git a/ftplugin/ocaml.vim b/ftplugin/ocaml.vim index c3d952de..d9e56533 100644 --- a/ftplugin/ocaml.vim +++ b/ftplugin/ocaml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ocaml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Language: OCaml " Maintainer: David Baelde <firstname.name@ens-lyon.org> @@ -648,5 +643,3 @@ let &cpoptions=s:cposet unlet s:cposet " vim:sw=2 fdm=indent - -endif diff --git a/ftplugin/ocamlbuild_tags.vim b/ftplugin/ocamlbuild_tags.vim index 75167bf7..cfe932fe 100644 --- a/ftplugin/ocamlbuild_tags.vim +++ b/ftplugin/ocamlbuild_tags.vim @@ -1,14 +1,7 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ocamlbuild_tags.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 setlocal comments=:# setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/occam.vim b/ftplugin/occam.vim index 4a6d6aa9..766c71fb 100644 --- a/ftplugin/occam.vim +++ b/ftplugin/occam.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/occam.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('occam', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'occam') == -1 " Vim filetype plugin file " Language: occam @@ -56,5 +51,3 @@ let b:undo_ftplugin = "setlocal shiftwidth< softtabstop< expandtab<" let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/ftplugin/omake.vim b/ftplugin/omake.vim index 7b04a99a..e75e09b3 100644 --- a/ftplugin/omake.vim +++ b/ftplugin/omake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/omake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Vim filetype plugin file " Language: OMake @@ -31,5 +26,3 @@ setlocal expandtab " Including files. let &l:include = '^\s*include' - -endif diff --git a/ftplugin/opencl.vim b/ftplugin/opencl.vim index 93132f10..ab894361 100644 --- a/ftplugin/opencl.vim +++ b/ftplugin/opencl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/opencl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('opencl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'opencl') == -1 if exists("b:did_ftplugin") | finish | endif @@ -22,5 +17,3 @@ setlocal smarttab setlocal smartindent let b:did_ftplugin = 1 - -endif diff --git a/ftplugin/pamconf.vim b/ftplugin/pamconf.vim index 548c262a..09dada12 100644 --- a/ftplugin/pamconf.vim +++ b/ftplugin/pamconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pamconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pamconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pamconf') == -1 " Vim filetype plugin file " Language: pam(8) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/pascal.vim b/ftplugin/pascal.vim index 828e8d1e..542343da 100644 --- a/ftplugin/pascal.vim +++ b/ftplugin/pascal.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pascal.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pascal', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pascal') == -1 " Vim filetype plugin file " Language: pascal @@ -27,5 +22,3 @@ endif " Undo the stuff we changed. let b:undo_ftplugin = "unlet! b:match_words" - -endif diff --git a/ftplugin/passwd.vim b/ftplugin/passwd.vim index 3116758c..70aa41c2 100644 --- a/ftplugin/passwd.vim +++ b/ftplugin/passwd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/passwd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('passwd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'passwd') == -1 " Vim filetype plugin file " Language: passwd(5) password file @@ -26,5 +21,3 @@ setlocal comments= commentstring= formatoptions-=tcroq formatoptions+=l let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/pdf.vim b/ftplugin/pdf.vim index 97d77deb..bf637d0f 100644 --- a/ftplugin/pdf.vim +++ b/ftplugin/pdf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pdf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pdf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pdf') == -1 " Vim filetype plugin file " Language: PDF @@ -96,5 +91,3 @@ function! s:notag() echo "E426: tag not found" echohl NONE endfunction - -endif diff --git a/ftplugin/perl.vim b/ftplugin/perl.vim index 5018676b..33475a85 100644 --- a/ftplugin/perl.vim +++ b/ftplugin/perl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/perl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Vim filetype plugin file " Language: Perl @@ -96,5 +91,3 @@ let b:match_words = '\<if\>:\<elsif\>:\<else\>' " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/pinfo.vim b/ftplugin/pinfo.vim index 86746f32..72ed6b95 100644 --- a/ftplugin/pinfo.vim +++ b/ftplugin/pinfo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pinfo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pinfo', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pinfo') == -1 " Vim filetype plugin file " Language: pinfo(1) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/plantuml.vim b/ftplugin/plantuml.vim index 1ab7da13..5146b243 100644 --- a/ftplugin/plantuml.vim +++ b/ftplugin/plantuml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/plantuml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('plantuml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'plantuml') == -1 scriptencoding utf-8 " Vim filetype plugin file @@ -51,5 +46,3 @@ let b:endwise_syngroups = 'plantumlKeyword,plantumlPreProc' let &cpoptions = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/pony.vim b/ftplugin/pony.vim index dee95d8e..7d2d684e 100644 --- a/ftplugin/pony.vim +++ b/ftplugin/pony.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pony.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pony', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pony') == -1 " Vim filetype plugin file " Language: Pony @@ -47,5 +42,3 @@ let &cpo = s:cpo_save unlet s:cpo_save let b:did_ftplugin = 1 - -endif diff --git a/ftplugin/postscr.vim b/ftplugin/postscr.vim index 66631393..e2926fb0 100644 --- a/ftplugin/postscr.vim +++ b/ftplugin/postscr.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/postscr.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('postscr', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'postscr') == -1 " Vim filetype plugin file " Language: PostScript @@ -45,5 +40,3 @@ let b:undo_ftplugin = "setlocal comments< formatoptions<" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/procmail.vim b/ftplugin/procmail.vim index 1c82967e..fed5e4d4 100644 --- a/ftplugin/procmail.vim +++ b/ftplugin/procmail.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/procmail.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('procmail', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'procmail') == -1 " Vim filetype plugin file " Language: procmail(1) configuration file @@ -28,5 +23,3 @@ let &l:include = '^\s*INCLUDERC\>' let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/prolog.vim b/ftplugin/prolog.vim index a2a50602..0ed3fccf 100644 --- a/ftplugin/prolog.vim +++ b/ftplugin/prolog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/prolog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('prolog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'prolog') == -1 " Vim filetype plugin file " Language: Prolog @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/protocols.vim b/ftplugin/protocols.vim index d8cd8f65..da0a6699 100644 --- a/ftplugin/protocols.vim +++ b/ftplugin/protocols.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/protocols.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('protocols', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'protocols') == -1 " Vim filetype plugin file " Language: protocols(5) - Internet protocols definition file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ps1.vim b/ftplugin/ps1.vim index b6d98258..25c015cb 100644 --- a/ftplugin/ps1.vim +++ b/ftplugin/ps1.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ps1.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('powershell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1 " Vim filetype plugin file " Language: Windows PowerShell @@ -63,5 +58,3 @@ setlocal keywordprg=:GetHelp let b:undo_ftplugin = "setlocal tw< cms< fo< iskeyword< keywordprg<" . \ " | unlet! b:browsefilter" - -endif diff --git a/ftplugin/ps1xml.vim b/ftplugin/ps1xml.vim index c9efc5ae..e8afcf6a 100644 --- a/ftplugin/ps1xml.vim +++ b/ftplugin/ps1xml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ps1xml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('powershell', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'powershell') == -1 " Vim filetype plugin file " Language: Windows PowerShell @@ -38,5 +33,3 @@ endif let b:undo_ftplugin = "setlocal tw< cms< fo<" . \ " | unlet! b:browsefilter" - -endif diff --git a/ftplugin/pug.vim b/ftplugin/pug.vim index 3237029c..4be43d55 100644 --- a/ftplugin/pug.vim +++ b/ftplugin/pug.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pug.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pug', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pug') == -1 " Vim filetype plugin " Language: Pug @@ -64,5 +59,3 @@ let b:undo_ftplugin = "setl cms< com< " let &cpo = s:save_cpo " vim:set sw=2: - -endif diff --git a/ftplugin/puppet.vim b/ftplugin/puppet.vim index 42737508..6c8ec633 100644 --- a/ftplugin/puppet.vim +++ b/ftplugin/puppet.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/puppet.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 " Vim filetype plugin " Language: Puppet @@ -35,5 +30,3 @@ let b:undo_ftplugin = " \| setlocal keywordprg< iskeyword< comments< commentstring< \| setlocal formatoptions< formatexpr< \" - -endif diff --git a/ftplugin/puppet_tagbar.vim b/ftplugin/puppet_tagbar.vim index 84751db1..6724b3a0 100644 --- a/ftplugin/puppet_tagbar.vim +++ b/ftplugin/puppet_tagbar.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/puppet_tagbar.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('puppet', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'puppet') == -1 " Puppet set up for Tagbar plugin " (https://github.com/majutsushi/tagbar). @@ -51,5 +46,3 @@ endif let g:tagbar_type_puppet.deffile = puppet#ctags#OptionFile() - -endif diff --git a/ftplugin/purescript.vim b/ftplugin/purescript.vim index b53af764..366b2da2 100644 --- a/ftplugin/purescript.vim +++ b/ftplugin/purescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/purescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('purescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'purescript') == -1 setlocal comments=s1fl:{-,mb:\ \ ,ex:-},:--\ \|,:-- setlocal commentstring=--\ %s @@ -46,5 +41,3 @@ fun! InitPureScript() call add(s:PS, [dir, &l:path]) endfun call InitPureScript() - -endif diff --git a/ftplugin/pyrex.vim b/ftplugin/pyrex.vim index 6e275e3a..5c64042c 100644 --- a/ftplugin/pyrex.vim +++ b/ftplugin/pyrex.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/pyrex.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('pyrex', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'pyrex') == -1 " Vim filetype plugin file " Language: Pyrex @@ -34,5 +29,3 @@ endif let &cpo = s:keepcpo unlet s:keepcpo - -endif diff --git a/ftplugin/qml.vim b/ftplugin/qml.vim index 982b9ac7..ae94d461 100644 --- a/ftplugin/qml.vim +++ b/ftplugin/qml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/qml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('qml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'qml') == -1 " Vim filetype plugin file " Language: qml @@ -44,5 +39,3 @@ setlocal formatoptions+=croql let &cpoptions = s:cpoptions_save unlet s:cpoptions_save - -endif diff --git a/ftplugin/quake.vim b/ftplugin/quake.vim index e3601fc8..03b49c0a 100644 --- a/ftplugin/quake.vim +++ b/ftplugin/quake.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/quake.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('quake', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'quake') == -1 " Vim filetype plugin file " Language: Quake[1-3] configuration file @@ -26,5 +21,3 @@ setlocal comments=:// commentstring=//\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/racket.vim b/ftplugin/racket.vim index bc3d76c9..ad4be8c8 100644 --- a/ftplugin/racket.vim +++ b/ftplugin/racket.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/racket.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('racket', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'racket') == -1 " Language: Racket " Maintainer: Will Langstroth <will@langstroth.com> @@ -83,5 +78,3 @@ let b:undo_ftplugin = \. "| setl makeprg< commentstring<" \. "| nunmap <buffer> K" \. "| vunmap <buffer> K" - -endif diff --git a/ftplugin/raku.vim b/ftplugin/raku.vim index a56385d1..8f9a55ec 100644 --- a/ftplugin/raku.vim +++ b/ftplugin/raku.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/raku.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('raku', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'raku') == -1 " Vim filetype plugin file " Language: Raku @@ -150,5 +145,3 @@ let b:undo_ftplugin = "setlocal fo< com< cms< inc< inex< def< isf< isk< kp< path " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/raml.vim b/ftplugin/raml.vim index ec1a3c4a..fecbba66 100644 --- a/ftplugin/raml.vim +++ b/ftplugin/raml.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/raml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('raml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'raml') == -1 set ts=2 sts=2 sw=2 et - -endif diff --git a/ftplugin/razor.vim b/ftplugin/razor.vim index 8b229622..4bd0bc4a 100644 --- a/ftplugin/razor.vim +++ b/ftplugin/razor.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/razor.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('razor', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'razor') == -1 if exists("b:did_ftplugin") finish @@ -13,5 +8,3 @@ endif let b:did_ftplugin = 1 " vim:set sw=2: - -endif diff --git a/ftplugin/readline.vim b/ftplugin/readline.vim index ea38cd55..b1a0a0bc 100644 --- a/ftplugin/readline.vim +++ b/ftplugin/readline.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/readline.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('readline', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'readline') == -1 " Vim filetype plugin file " Language: readline(3) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/reva.vim b/ftplugin/reva.vim index d82461dc..b5211a02 100644 --- a/ftplugin/reva.vim +++ b/ftplugin/reva.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/reva.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('reva', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'reva') == -1 " Vim ftplugin file " Language: Reva Forth @@ -32,5 +27,3 @@ setlocal com=s1:/*,mb:*,ex:*/,:\|,:\\ setlocal fo=tcrqol setlocal matchpairs+=\::; setlocal iskeyword=!,@,33-35,%,$,38-64,A-Z,91-96,a-z,123-126,128-255 - -endif diff --git a/ftplugin/rmd.vim b/ftplugin/rmd.vim index b6a16c8c..f0e6ce6f 100644 --- a/ftplugin/rmd.vim +++ b/ftplugin/rmd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rmd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rmd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rmd') == -1 " Vim filetype plugin file " Language: R Markdown file @@ -70,5 +65,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 - -endif diff --git a/ftplugin/rnc.vim b/ftplugin/rnc.vim index 4873a22d..86645ab4 100644 --- a/ftplugin/rnc.vim +++ b/ftplugin/rnc.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rnc.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rnc', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rnc') == -1 " Vim filetype plugin file " Language: Relax NG compact syntax @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/rnoweb.vim b/ftplugin/rnoweb.vim index 21efcbfe..44e4d0fc 100644 --- a/ftplugin/rnoweb.vim +++ b/ftplugin/rnoweb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rnoweb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rnoweb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rnoweb') == -1 " Vim filetype plugin file " Language: Rnoweb @@ -48,5 +43,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 - -endif diff --git a/ftplugin/rpl.vim b/ftplugin/rpl.vim index af331849..3324ea9b 100644 --- a/ftplugin/rpl.vim +++ b/ftplugin/rpl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rpl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rpl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rpl') == -1 " Vim filetype plugin file " Language: RPL/2 @@ -29,5 +24,3 @@ setlocal fo-=t fo+=croql setlocal comments=sO:*\ -,mO:*\ \ ,exO:*/,s1:/*,mb:*,ex:*/,:// let b:undo_ftplugin = "setlocal fo< comments<" - -endif diff --git a/ftplugin/rrst.vim b/ftplugin/rrst.vim index 6c0d51d4..dd8b1238 100644 --- a/ftplugin/rrst.vim +++ b/ftplugin/rrst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rrst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rrst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rrst') == -1 " Vim filetype plugin file " Language: reStructuredText documentation format with R code @@ -61,5 +56,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: sw=2 - -endif diff --git a/ftplugin/rst.vim b/ftplugin/rst.vim index 791de7b9..10554403 100644 --- a/ftplugin/rst.vim +++ b/ftplugin/rst.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rst.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rst', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rst') == -1 " reStructuredText filetype plugin file " Language: reStructuredText documentation format @@ -54,5 +49,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/ruby.vim b/ftplugin/ruby.vim index 5a7c6e7d..d2bd231a 100644 --- a/ftplugin/ruby.vim +++ b/ftplugin/ruby.vim @@ -1,18 +1,13 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/ruby.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ruby', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ruby') == -1 " Vim filetype plugin " Language: Ruby " Maintainer: Tim Pope <vimNOSPAM@tpope.org> " URL: https://github.com/vim-ruby/vim-ruby " Release Coordinator: Doug Kearns <dougkearns@gmail.com> - +loadedbad if (exists("b:did_ftplugin")) finish endif @@ -443,5 +438,3 @@ endfunction " " vim: nowrap sw=2 sts=2 ts=8: - -endif diff --git a/ftplugin/rust.vim b/ftplugin/rust.vim index 780baf39..b5e3b771 100644 --- a/ftplugin/rust.vim +++ b/ftplugin/rust.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rust.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " Language: Rust " Description: Vim ftplugin for Rust @@ -207,5 +202,3 @@ unlet s:save_cpo " vint: +ProhibitAbbreviationOption " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/ftplugin/rust/tagbar.vim b/ftplugin/rust/tagbar.vim index 1301ca81..f8ccbf75 100644 --- a/ftplugin/rust/tagbar.vim +++ b/ftplugin/rust/tagbar.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/rust/tagbar.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('rust', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'rust') == -1 " " Support for Tagbar -- https://github.com/majutsushi/tagbar @@ -47,5 +42,3 @@ unlet s:save_cpo " vim: set et sw=4 sts=4 ts=8: - -endif diff --git a/ftplugin/sass.vim b/ftplugin/sass.vim index 3f4acf6e..ec303c12 100644 --- a/ftplugin/sass.vim +++ b/ftplugin/sass.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sass.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sass', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sass') == -1 " Vim filetype plugin " Language: Sass @@ -44,5 +39,3 @@ function! SassIncludeExpr(file) abort endfunction " vim:set sw=2: - -endif diff --git a/ftplugin/sbt.vim b/ftplugin/sbt.vim index 260360c7..9d6b6429 100644 --- a/ftplugin/sbt.vim +++ b/ftplugin/sbt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sbt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sbt', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sbt') == -1 " Vim filetype plugin file " Language: sbt @@ -22,5 +17,3 @@ let b:did_ftplugin = 1 runtime! ftplugin/scala.vim - -endif diff --git a/ftplugin/scala.vim b/ftplugin/scala.vim index c80daabb..29bb9238 100644 --- a/ftplugin/scala.vim +++ b/ftplugin/scala.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/scala.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 " Vim filetype plugin " Language: Scala @@ -183,5 +178,3 @@ noremap <script> <buffer> <silent> ]] :call <SID>NextSection(0)<cr> noremap <script> <buffer> <silent> [[ :call <SID>NextSection(1)<cr> " vim:set sw=2 sts=2 ts=8 et: - -endif diff --git a/ftplugin/scala.xpt.vim b/ftplugin/scala.xpt.vim index 9df57081..e18ced84 100644 --- a/ftplugin/scala.xpt.vim +++ b/ftplugin/scala.xpt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/scala.xpt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 XPTemplate priority=lang @@ -36,5 +31,3 @@ trait `derived^`trait^Component extends `trait^Component { `body2^ } } - -endif diff --git a/ftplugin/scala/tagbar.vim b/ftplugin/scala/tagbar.vim index 8236d737..c290af07 100644 --- a/ftplugin/scala/tagbar.vim +++ b/ftplugin/scala/tagbar.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/scala/tagbar.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scala') == -1 " " Support for Tagbar -- https://github.com/majutsushi/tagbar @@ -38,5 +33,3 @@ let g:tagbar_type_scala = { if get(g:, 'scala_use_builtin_tagbar_defs', 1) let g:tagbar_type_scala.deffile = expand('<sfile>:p:h:h:h') . '/ctags/scala.ctags' endif - -endif diff --git a/ftplugin/scheme.vim b/ftplugin/scheme.vim index 68ad8c8b..edbcfa0c 100644 --- a/ftplugin/scheme.vim +++ b/ftplugin/scheme.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/scheme.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scheme', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scheme') == -1 " Vim filetype plugin file " Language: Scheme (R7RS) @@ -64,5 +59,3 @@ unlet b:did_scheme_ftplugin let b:did_ftplugin = 1 let &cpo = s:cpo unlet s:cpo - -endif diff --git a/ftplugin/screen.vim b/ftplugin/screen.vim index 2acc4b87..d2da6398 100644 --- a/ftplugin/screen.vim +++ b/ftplugin/screen.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/screen.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('screen', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'screen') == -1 " Vim filetype plugin file " Language: screen(1) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/scss.vim b/ftplugin/scss.vim index abed20d5..78cbe958 100644 --- a/ftplugin/scss.vim +++ b/ftplugin/scss.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/scss.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('scss', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'scss') == -1 if exists('b:did_indent') && b:did_indent " be kind. allow users to override this. Does it work? @@ -20,5 +15,3 @@ setlocal formatoptions+=ro " SCSS comments are either /* */ or // setlocal comments=s1:/*,mb:*,ex:*/,:// - -endif diff --git a/ftplugin/sensors.vim b/ftplugin/sensors.vim index dba05b65..3d9109ea 100644 --- a/ftplugin/sensors.vim +++ b/ftplugin/sensors.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sensors.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sensors', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sensors') == -1 " Vim filetype plugin file " Language: sensors.conf(5) - libsensors configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/services.vim b/ftplugin/services.vim index c4aaec81..84afa274 100644 --- a/ftplugin/services.vim +++ b/ftplugin/services.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/services.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('services', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'services') == -1 " Vim filetype plugin file " Language: services(5) - Internet network services list @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/setserial.vim b/ftplugin/setserial.vim index 4d588ae3..5bbe7182 100644 --- a/ftplugin/setserial.vim +++ b/ftplugin/setserial.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/setserial.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('setserial', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'setserial') == -1 " Vim filetype plugin file " Language: setserial(8) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/sexplib.vim b/ftplugin/sexplib.vim index 16af8a15..c019c9e4 100644 --- a/ftplugin/sexplib.vim +++ b/ftplugin/sexplib.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sexplib.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('ocaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'ocaml') == -1 " Language: Sexplib " Maintainer: Markus Mottl <markus.mottl@gmail.com> @@ -21,5 +16,3 @@ let b:did_ftplugin=1 " Comment string setl commentstring=;\ %s setl comments=:; - -endif diff --git a/ftplugin/sieve.vim b/ftplugin/sieve.vim index 9f59d80f..596fdd80 100644 --- a/ftplugin/sieve.vim +++ b/ftplugin/sieve.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sieve.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sieve', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sieve') == -1 " Vim filetype plugin file " Language: Sieve filtering language input file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/slim.vim b/ftplugin/slim.vim index 184b54d3..46b72c08 100644 --- a/ftplugin/slim.vim +++ b/ftplugin/slim.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/slim.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slim', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slim') == -1 if exists("b:did_ftplugin") finish @@ -32,5 +27,3 @@ let b:undo_ftplugin = "setl isk<" . " | " . s:undo_ftplugin setlocal iskeyword+=- setlocal commentstring=/%s - -endif diff --git a/ftplugin/slpconf.vim b/ftplugin/slpconf.vim index 14fa5436..e036286c 100644 --- a/ftplugin/slpconf.vim +++ b/ftplugin/slpconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/slpconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slpconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slpconf') == -1 " Vim filetype plugin file " Language: RFC 2614 - An API for Service Location configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/slpreg.vim b/ftplugin/slpreg.vim index e4b4580e..f3b64456 100644 --- a/ftplugin/slpreg.vim +++ b/ftplugin/slpreg.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/slpreg.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slpreg', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slpreg') == -1 " Vim filetype plugin file " Language: RFC 2614 - An API for Service Location registration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/slpspi.vim b/ftplugin/slpspi.vim index 9a042d4f..5e6641ba 100644 --- a/ftplugin/slpspi.vim +++ b/ftplugin/slpspi.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/slpspi.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('slpspi', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'slpspi') == -1 " Vim filetype plugin file " Language: RFC 2614 - An API for Service Location SPI file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/smt2.vim b/ftplugin/smt2.vim index 86dfa720..03b5ba2b 100644 --- a/ftplugin/smt2.vim +++ b/ftplugin/smt2.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/smt2.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('smt2', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'smt2') == -1 setlocal iskeyword+=-,:,#,',$ @@ -32,5 +27,3 @@ nnoremap <silent> <buffer> <localleader>v :call smt2#PrintSolverVersion()<cr> " Comment String setlocal commentstring=;%s - -endif diff --git a/ftplugin/solidity.vim b/ftplugin/solidity.vim index 43bfb3f4..1d52826e 100644 --- a/ftplugin/solidity.vim +++ b/ftplugin/solidity.vim @@ -1,12 +1,5 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/solidity.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('solidity', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'solidity') == -1 setlocal commentstring=//\ %s - -endif diff --git a/ftplugin/spec.vim b/ftplugin/spec.vim index 772e218a..a7b9f9cd 100644 --- a/ftplugin/spec.vim +++ b/ftplugin/spec.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/spec.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('spec', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'spec') == -1 " Plugin to update the %changelog section of RPM spec files " Filename: spec.vim @@ -215,5 +210,3 @@ let &cpo = s:cpo_save unlet s:cpo_save let b:undo_ftplugin = "unlet! b:match_ignorecase b:match_words" - -endif diff --git a/ftplugin/sql.vim b/ftplugin/sql.vim index bd49428a..3338aed8 100644 --- a/ftplugin/sql.vim +++ b/ftplugin/sql.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sql.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sql', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sql') == -1 " SQL filetype plugin file " Language: SQL (Common for Oracle, Microsoft SQL Server, Sybase) @@ -555,5 +550,3 @@ let &cpo = s:save_cpo unlet s:save_cpo " vim:sw=4: - -endif diff --git a/ftplugin/sshconfig.vim b/ftplugin/sshconfig.vim index 3c7c13fc..b68be8b1 100644 --- a/ftplugin/sshconfig.vim +++ b/ftplugin/sshconfig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sshconfig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sshconfig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sshconfig') == -1 " Vim filetype plugin file " Language: OpenSSH client configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/stylus.vim b/ftplugin/stylus.vim index b5c8aaee..538a491a 100644 --- a/ftplugin/stylus.vim +++ b/ftplugin/stylus.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/stylus.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('stylus', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'stylus') == -1 " Vim filetype plugin " Language: Stylus @@ -70,5 +65,3 @@ let &cpo = s:save_cpo command! Stylus !clear; cat % | stylus " vim:set sw=2: - -endif diff --git a/ftplugin/sudoers.vim b/ftplugin/sudoers.vim index 3a09305f..e085e5a6 100644 --- a/ftplugin/sudoers.vim +++ b/ftplugin/sudoers.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sudoers.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sudoers', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sudoers') == -1 " Vim filetype plugin file " Language: sudoers(5) configuration files @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/svelte.vim b/ftplugin/svelte.vim index a7037418..132e6bbe 100644 --- a/ftplugin/svelte.vim +++ b/ftplugin/svelte.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/svelte.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('svelte', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'svelte') == -1 " Vim filetype plugin " Language: Svelte 3 (HTML/JavaScript) @@ -50,5 +45,3 @@ if exists('g:loaded_ale') let b:ale_linters = ['stylelint', 'eslint'] endif endif - -endif diff --git a/ftplugin/swift.vim b/ftplugin/swift.vim index 798a6b19..830acfb7 100644 --- a/ftplugin/swift.vim +++ b/ftplugin/swift.vim @@ -1,15 +1,8 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/swift.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('swift', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swift') == -1 setlocal commentstring=//\ %s " @-@ adds the literal @ to iskeyword for @IBAction and similar setlocal iskeyword+=@-@,# setlocal completefunc=syntaxcomplete#Complete - -endif diff --git a/ftplugin/swiftgyb.vim b/ftplugin/swiftgyb.vim index 87849112..6468b9cd 100644 --- a/ftplugin/swiftgyb.vim +++ b/ftplugin/swiftgyb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/swiftgyb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('swiftgyb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swiftgyb') == -1 " This source file is part of the Swift.org open source project " @@ -18,5 +13,3 @@ if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'swiftgyb') == - " Vim maintainer: Emir SARI <bitigchi@me.com> runtime! ftplugin/swift.vim - -endif diff --git a/ftplugin/sysctl.vim b/ftplugin/sysctl.vim index 87e08de2..efb8ce6b 100644 --- a/ftplugin/sysctl.vim +++ b/ftplugin/sysctl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/sysctl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('sysctl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'sysctl') == -1 " Vim filetype plugin file " Language: sysctl.conf(5) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/systemd.vim b/ftplugin/systemd.vim index a4ff2eb1..26adf612 100644 --- a/ftplugin/systemd.vim +++ b/ftplugin/systemd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/systemd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('systemd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'systemd') == -1 " Vim filetype plugin file " Language: systemd unit files @@ -29,5 +24,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/systemverilog.vim b/ftplugin/systemverilog.vim index 4a322e03..2f0a7244 100644 --- a/ftplugin/systemverilog.vim +++ b/ftplugin/systemverilog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/systemverilog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('systemverilog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'systemverilog') == -1 " Vim filetype plugin file " Language: SystemVerilog @@ -18,5 +13,3 @@ endif " Behaves just like Verilog runtime! ftplugin/verilog.vim - -endif diff --git a/ftplugin/tablegen.vim b/ftplugin/tablegen.vim index 88516995..28bd6fdd 100644 --- a/ftplugin/tablegen.vim +++ b/ftplugin/tablegen.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/tablegen.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('llvm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'llvm') == -1 " Vim filetype plugin file " Language: LLVM TableGen @@ -19,5 +14,3 @@ let b:did_ftplugin = 1 setlocal matchpairs+=<:> setlocal softtabstop=2 shiftwidth=2 setlocal expandtab - -endif diff --git a/ftplugin/tcl.vim b/ftplugin/tcl.vim index e1a6bf3e..7ba25f7f 100644 --- a/ftplugin/tcl.vim +++ b/ftplugin/tcl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/tcl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tcl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tcl') == -1 " Vim filetype plugin file " Language: Tcl @@ -44,5 +39,3 @@ let &cpo = s:cpo_save unlet s:cpo_save " vim: set et ts=4 sw=4 tw=78: - -endif diff --git a/ftplugin/terminfo.vim b/ftplugin/terminfo.vim index 9150f8c9..a83ca282 100644 --- a/ftplugin/terminfo.vim +++ b/ftplugin/terminfo.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/terminfo.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('terminfo', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terminfo') == -1 " Vim filetype plugin file " Language: terminfo(5) definition @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/terraform.vim b/ftplugin/terraform.vim index 2f6122c2..63e74df7 100644 --- a/ftplugin/terraform.vim +++ b/ftplugin/terraform.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/terraform.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('terraform', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'terraform') == -1 " terraform.vim - basic vim/terraform integration " Maintainer: HashiVim <https://github.com/hashivim> @@ -68,5 +63,3 @@ endif let &cpoptions = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/tex.vim b/ftplugin/tex.vim index 308b859a..53b95e3f 100644 --- a/ftplugin/tex.vim +++ b/ftplugin/tex.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/tex.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tex', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tex') == -1 " LaTeX filetype plugin " Language: LaTeX (ft=tex) @@ -53,5 +48,3 @@ let &cpo = s:save_cpo unlet s:save_cpo " vim:sts=2:sw=2: - -endif diff --git a/ftplugin/text.vim b/ftplugin/text.vim index 58f151a8..99d387f5 100644 --- a/ftplugin/text.vim +++ b/ftplugin/text.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/text.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('text', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'text') == -1 " Vim filetype plugin " Language: Text @@ -25,5 +20,3 @@ let b:undo_ftplugin = 'setlocal comments< commentstring<' " for Mail quoted text with '>'. setlocal comments=fb:-,fb:*,n:> setlocal commentstring= - -endif diff --git a/ftplugin/textile.vim b/ftplugin/textile.vim index 6799e23a..96828942 100644 --- a/ftplugin/textile.vim +++ b/ftplugin/textile.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/textile.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('textile', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'textile') == -1 " textile.vim " @@ -66,5 +61,3 @@ function! TextileRenderBufferToTab() set syntax=html endfunction - -endif diff --git a/ftplugin/tmux.vim b/ftplugin/tmux.vim index 53aafc80..c598635f 100644 --- a/ftplugin/tmux.vim +++ b/ftplugin/tmux.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/tmux.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('tmux', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'tmux') == -1 " Vim filetype plugin file " Language: tmux(1) configuration file @@ -22,5 +17,3 @@ let b:undo_ftplugin = "setlocal comments< commentstring<" setlocal comments=:# setlocal commentstring=#\ %s - -endif diff --git a/ftplugin/toml.vim b/ftplugin/toml.vim index 9d489fbc..fb12e87c 100644 --- a/ftplugin/toml.vim +++ b/ftplugin/toml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/toml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('toml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'toml') == -1 " File: ftplugin/toml.vim " Author: Kevin Ballard <kevin@sb.org> @@ -28,5 +23,3 @@ let &cpo = s:save_cpo unlet s:save_cpo " vim: set et sw=4 ts=4: - -endif diff --git a/ftplugin/treetop.vim b/ftplugin/treetop.vim index 4069f641..65a43fb7 100644 --- a/ftplugin/treetop.vim +++ b/ftplugin/treetop.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/treetop.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('treetop', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'treetop') == -1 " Vim filetype plugin file " Language: Treetop @@ -26,5 +21,3 @@ let b:undo_ftplugin = "setl com< cms< fo<" let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/tt2html.vim b/ftplugin/tt2html.vim index de8b6377..c1c47c56 100644 --- a/ftplugin/tt2html.vim +++ b/ftplugin/tt2html.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/tt2html.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Language: TT2 embedded with HTML " Maintainer: vim-perl <vim-perl@googlegroups.com> @@ -20,5 +15,3 @@ endif " Just use the HTML plugin for now. runtime! ftplugin/html.vim ftplugin/html_*.vim ftplugin/html/*.vim - -endif diff --git a/ftplugin/twig.vim b/ftplugin/twig.vim index 52b14150..ac52d1b9 100644 --- a/ftplugin/twig.vim +++ b/ftplugin/twig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/twig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('twig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'twig') == -1 " Vim filetype plugin " Language: Twig @@ -47,5 +42,3 @@ else endif " vim:set sw=2: - -endif diff --git a/ftplugin/typescript.vim b/ftplugin/typescript.vim index fa14101b..4eece320 100644 --- a/ftplugin/typescript.vim +++ b/ftplugin/typescript.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/typescript.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 " set Vi-incompatible, compiler and commentstring @@ -89,5 +84,3 @@ let g:tagbar_type_typescript = { if get(g:, 'typescript_use_builtin_tagbar_defs', 1) let g:tagbar_type_typescript.deffile = expand('<sfile>:p:h:h') . '/ctags/typescript.ctags' endif - -endif diff --git a/ftplugin/typescriptreact.vim b/ftplugin/typescriptreact.vim index 159f91b0..7f60b3f9 100644 --- a/ftplugin/typescriptreact.vim +++ b/ftplugin/typescriptreact.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/typescriptreact.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('typescript', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'typescript') == -1 " modified from mxw/vim-jsx from html.vim if exists("loaded_matchit") && !exists('b:tsx_match_words') @@ -22,5 +17,3 @@ setlocal comments=s1:/*,mb:*,ex:*/,:// setlocal formatoptions-=t formatoptions+=croql set suffixesadd+=.tsx - -endif diff --git a/ftplugin/udevconf.vim b/ftplugin/udevconf.vim index ccfd7155..d82aea9e 100644 --- a/ftplugin/udevconf.vim +++ b/ftplugin/udevconf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/udevconf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('udevconf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'udevconf') == -1 " Vim filetype plugin file " Language: udev(8) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/udevperm.vim b/ftplugin/udevperm.vim index 47e41555..bdafc586 100644 --- a/ftplugin/udevperm.vim +++ b/ftplugin/udevperm.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/udevperm.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('udevperm', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'udevperm') == -1 " Vim filetype plugin file " Language: udev(8) permissions file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/updatedb.vim b/ftplugin/updatedb.vim index f3bf376b..48f24051 100644 --- a/ftplugin/updatedb.vim +++ b/ftplugin/updatedb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/updatedb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('updatedb', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'updatedb') == -1 " Vim filetype plugin file " Language: updatedb.conf(5) configuration file @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/vala.vim b/ftplugin/vala.vim index 7c4fcddc..32d41d1b 100644 --- a/ftplugin/vala.vim +++ b/ftplugin/vala.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/vala.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vala', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vala') == -1 if exists('b:did_ftplugin') finish @@ -54,5 +49,3 @@ if (has("browsefilter")) && !exists("b:browsefilter") \ "Vala Vapi Files (*.vapi)\t*.vapi\n" . \ "All Files (*.*)\t*.*\n" endif - -endif diff --git a/ftplugin/vb.vim b/ftplugin/vb.vim index 2989165c..23cbd0ac 100644 --- a/ftplugin/vb.vim +++ b/ftplugin/vb.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/vb.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('visual-basic', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'visual-basic') == -1 " Vim filetype plugin file " Language: VisualBasic (ft=vb) @@ -52,5 +47,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/verilog.vim b/ftplugin/verilog.vim index ed2fd707..5b123335 100644 --- a/ftplugin/verilog.vim +++ b/ftplugin/verilog.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/verilog.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('verilog', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'verilog') == -1 " Vim filetype plugin file " Language: Verilog HDL @@ -73,5 +68,3 @@ endif " Reset 'cpoptions' back to the user's setting let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/vhdl.vim b/ftplugin/vhdl.vim index 81c6cadf..0e98087c 100644 --- a/ftplugin/vhdl.vim +++ b/ftplugin/vhdl.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/vhdl.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vhdl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vhdl') == -1 " VHDL filetype plugin " Language: VHDL @@ -95,5 +90,3 @@ vnoremap <buffer><silent>][ :<C-u>cal <SID>CountWrapper('][')<CR> let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/vlang.vim b/ftplugin/vlang.vim index 0a04d5ea..a3d3ceac 100644 --- a/ftplugin/vlang.vim +++ b/ftplugin/vlang.vim @@ -1,13 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/vlang.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('v', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'v') == -1 setlocal commentstring=//\ %s setlocal makeprg=v\ % - -endif diff --git a/ftplugin/vroom.vim b/ftplugin/vroom.vim index d13b5fe5..b73c76f3 100644 --- a/ftplugin/vroom.vim +++ b/ftplugin/vroom.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/vroom.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vroom', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vroom') == -1 " Vim filetype plugin file " Language: Vroom (vim testing and executable documentation) @@ -42,5 +37,3 @@ setlocal commentstring= let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/vue.vim b/ftplugin/vue.vim index 36e5293c..6cc068c6 100644 --- a/ftplugin/vue.vim +++ b/ftplugin/vue.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/vue.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('vue', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'vue') == -1 " Vim filetype plugin " Language: Vue.js @@ -26,5 +21,3 @@ if !exists('g:no_plugin_maps') && !exists('g:no_vue_maps') nnoremap <silent> <buffer> [] :call search('^</\(template\<Bar>script\<Bar>style\)', 'bW')<CR> nnoremap <silent> <buffer> ][ :call search('^</\(template\<Bar>script\<Bar>style\)', 'W')<CR> endif - -endif diff --git a/ftplugin/wast.vim b/ftplugin/wast.vim index f6a103c7..8e8b16b2 100644 --- a/ftplugin/wast.vim +++ b/ftplugin/wast.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/wast.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('wast', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'wast') == -1 " Vim filetype plugin file " Language: WebAssembly @@ -24,5 +19,3 @@ setlocal formatoptions-=t setlocal iskeyword+=$,.,/ let b:undo_ftplugin = "setlocal comments< commentstring< formatoptions< iskeyword<" - -endif diff --git a/ftplugin/xdefaults.vim b/ftplugin/xdefaults.vim index 9431ee40..9c7c7731 100644 --- a/ftplugin/xdefaults.vim +++ b/ftplugin/xdefaults.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xdefaults.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xdefaults', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xdefaults') == -1 " Vim filetype plugin file " Language: X resources files like ~/.Xdefaults (xrdb) @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/xf86conf.vim b/ftplugin/xf86conf.vim index d44adb27..62e7e0e6 100644 --- a/ftplugin/xf86conf.vim +++ b/ftplugin/xf86conf.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xf86conf.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xf86conf', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xf86conf') == -1 " Vim filetype plugin file " Language: XFree86 Configuration File @@ -26,5 +21,3 @@ setlocal comments=:# commentstring=#\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/xhtml.vim b/ftplugin/xhtml.vim index 48c5ee71..a2f6a724 100644 --- a/ftplugin/xhtml.vim +++ b/ftplugin/xhtml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xhtml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xhtml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xhtml') == -1 " Vim filetype plugin file " Language: xhtml @@ -74,5 +69,3 @@ let b:undo_ftplugin = "unlet! b:browsefilter b:match_words | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/xinetd.vim b/ftplugin/xinetd.vim index f0e459d5..c489135c 100644 --- a/ftplugin/xinetd.vim +++ b/ftplugin/xinetd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xinetd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xinetd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xinetd') == -1 " Vim filetype plugin file " Language: xinetd.conf(5) configuration file @@ -27,5 +22,3 @@ setlocal formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/xmodmap.vim b/ftplugin/xmodmap.vim index 7a2216a2..c80fbd34 100644 --- a/ftplugin/xmodmap.vim +++ b/ftplugin/xmodmap.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xmodmap.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xmodmap', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xmodmap') == -1 " Vim filetype plugin file " Language: xmodmap(1) definition file @@ -26,5 +21,3 @@ setlocal comments=:! commentstring=!\ %s formatoptions-=t formatoptions+=croql let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/xs.vim b/ftplugin/xs.vim index 0ebb13da..a3f996a8 100644 --- a/ftplugin/xs.vim +++ b/ftplugin/xs.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xs.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('perl', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'perl') == -1 " Vim filetype plugin file " Language: XS (Perl extension interface language) @@ -21,5 +16,3 @@ endif " Just use the C plugin for now. runtime! ftplugin/c.vim ftplugin/c_*.vim ftplugin/c/*.vim - -endif diff --git a/ftplugin/xsd.vim b/ftplugin/xsd.vim index 6b58eb29..d4849682 100644 --- a/ftplugin/xsd.vim +++ b/ftplugin/xsd.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xsd.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xsd', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xsd') == -1 " Vim filetype plugin file " Language: xsd @@ -46,5 +41,3 @@ let b:undo_ftplugin = "unlet! b:browsefilter | " . s:undo_ftplugin " Restore the saved compatibility options. let &cpo = s:save_cpo unlet s:save_cpo - -endif diff --git a/ftplugin/xslt.vim b/ftplugin/xslt.vim index b4109e57..034cefbb 100644 --- a/ftplugin/xslt.vim +++ b/ftplugin/xslt.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/xslt.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('xslt', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'xslt') == -1 " Vim filetype plugin file " Language: xslt @@ -23,5 +18,3 @@ let b:did_ftplugin = 1 if has("gui_win32") && exists("b:browsefilter") let b:browsefilter="XSLT Files (*.xsl,*.xslt)\t*.xsl;*.xslt\n" . b:browsefilter endif - -endif diff --git a/ftplugin/yaml.vim b/ftplugin/yaml.vim index 5675a9e9..5ffdb31a 100644 --- a/ftplugin/yaml.vim +++ b/ftplugin/yaml.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/yaml.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('yaml', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'yaml') == -1 " Vim filetype plugin file " Language: YAML (YAML Ain't Markup Language) @@ -32,5 +27,3 @@ endif let &cpo = s:cpo_save unlet s:cpo_save - -endif diff --git a/ftplugin/zig.vim b/ftplugin/zig.vim index 79d177e2..7762b877 100644 --- a/ftplugin/zig.vim +++ b/ftplugin/zig.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/zig.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zig', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zig') == -1 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -54,5 +49,3 @@ let b:undo_ftplugin = let &cpo = s:cpo_orig unlet s:cpo_orig " vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab - -endif diff --git a/ftplugin/zimbu.vim b/ftplugin/zimbu.vim index d6299685..71575497 100644 --- a/ftplugin/zimbu.vim +++ b/ftplugin/zimbu.vim @@ -1,11 +1,6 @@ -let s:base = expand("<sfile>:h:h") -let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } -let files = filter(globpath(&rtp, 'ftplugin/zimbu.vim', 1, 1), Filter) -if len(files) > 0 - exec 'source ' . files[0] +if !polyglot#util#IsEnabled('zimbu', expand('<sfile>:p')) finish endif -if !exists('g:polyglot_disabled') || index(g:polyglot_disabled, 'zimbu') == -1 " Vim filetype plugin file " Language: Zimbu @@ -160,5 +155,3 @@ endfunc let &cpo = s:cpo_save unlet s:cpo_save - -endif |