diff options
author | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-24 23:50:54 +0200 |
---|---|---|
committer | Adam Stankiewicz <sheerun@sher.pl> | 2020-10-24 23:50:54 +0200 |
commit | d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1 (patch) | |
tree | 02e5ede89ee8e6066dc8c4e11033c8ec1684a1dc /ftplugin | |
parent | 20b31f533764c4c32582124de8d8a6f6c9499c8a (diff) | |
download | vim-polyglot-d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1.tar.gz vim-polyglot-d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1.zip |
Fix recursive loading, closes #605
Diffstat (limited to 'ftplugin')
260 files changed, 780 insertions, 260 deletions
diff --git a/ftplugin/8th.vim b/ftplugin/8th.vim index f6877548..befe694b 100644 --- a/ftplugin/8th.vim +++ b/ftplugin/8th.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/8th.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/a2ps.vim b/ftplugin/a2ps.vim index 052a9fb8..d92fdf64 100644 --- a/ftplugin/a2ps.vim +++ b/ftplugin/a2ps.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/a2ps.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/aap.vim b/ftplugin/aap.vim index d9f3213c..2d900318 100644 --- a/ftplugin/aap.vim +++ b/ftplugin/aap.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/aap.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/abap.vim b/ftplugin/abap.vim index 0ecefa79..96ab0d56 100644 --- a/ftplugin/abap.vim +++ b/ftplugin/abap.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/abap.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/abaqus.vim b/ftplugin/abaqus.vim index f6d21fa1..2214d4f4 100644 --- a/ftplugin/abaqus.vim +++ b/ftplugin/abaqus.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/abaqus.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ada.vim b/ftplugin/ada.vim index 19dbdd20..1d067182 100644 --- a/ftplugin/ada.vim +++ b/ftplugin/ada.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ada.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/alsaconf.vim b/ftplugin/alsaconf.vim index 5aac50a4..a481b76a 100644 --- a/ftplugin/alsaconf.vim +++ b/ftplugin/alsaconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/alsaconf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ansible.vim b/ftplugin/ansible.vim index 32b30474..cef2e9c4 100644 --- a/ftplugin/ansible.vim +++ b/ftplugin/ansible.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ansible.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ansible_hosts.vim b/ftplugin/ansible_hosts.vim index d93ef6f8..6f819a7e 100644 --- a/ftplugin/ansible_hosts.vim +++ b/ftplugin/ansible_hosts.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ansible_hosts.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ant.vim b/ftplugin/ant.vim index a69d4df0..184818a5 100644 --- a/ftplugin/ant.vim +++ b/ftplugin/ant.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ant.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/arch.vim b/ftplugin/arch.vim index e674fdb0..5910287e 100644 --- a/ftplugin/arch.vim +++ b/ftplugin/arch.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/arch.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/art.vim b/ftplugin/art.vim index 65d411dc..edbc86a3 100644 --- a/ftplugin/art.vim +++ b/ftplugin/art.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/art.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/aspvbs.vim b/ftplugin/aspvbs.vim index 6c3c53df..4899bfb3 100644 --- a/ftplugin/aspvbs.vim +++ b/ftplugin/aspvbs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/aspvbs.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/automake.vim b/ftplugin/automake.vim index f5c92bcc..ed47025c 100644 --- a/ftplugin/automake.vim +++ b/ftplugin/automake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/automake.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/awk.vim b/ftplugin/awk.vim index 764edfd9..9bbeb276 100644 --- a/ftplugin/awk.vim +++ b/ftplugin/awk.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/awk.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/bdf.vim b/ftplugin/bdf.vim index ae22bf31..74b50871 100644 --- a/ftplugin/bdf.vim +++ b/ftplugin/bdf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/bdf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/blade.vim b/ftplugin/blade.vim index 81020de7..4fa102d9 100644 --- a/ftplugin/blade.vim +++ b/ftplugin/blade.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/blade.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/bst.vim b/ftplugin/bst.vim index 5e49c1bc..2539a109 100644 --- a/ftplugin/bst.vim +++ b/ftplugin/bst.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/bst.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/bzl.vim b/ftplugin/bzl.vim index c65643a4..69c95d1d 100644 --- a/ftplugin/bzl.vim +++ b/ftplugin/bzl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/bzl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/caddyfile.vim b/ftplugin/caddyfile.vim index 5d480987..f9725ee2 100644 --- a/ftplugin/caddyfile.vim +++ b/ftplugin/caddyfile.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/caddyfile.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/calendar.vim b/ftplugin/calendar.vim index b5af5c1e..12f84394 100644 --- a/ftplugin/calendar.vim +++ b/ftplugin/calendar.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/calendar.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/cdrdaoconf.vim b/ftplugin/cdrdaoconf.vim index 478aaf9d..f048ef9f 100644 --- a/ftplugin/cdrdaoconf.vim +++ b/ftplugin/cdrdaoconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/cdrdaoconf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/cfg.vim b/ftplugin/cfg.vim index 472e5240..6ed841bb 100644 --- a/ftplugin/cfg.vim +++ b/ftplugin/cfg.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/cfg.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ch.vim b/ftplugin/ch.vim index 5222c5e8..cd71d7ec 100644 --- a/ftplugin/ch.vim +++ b/ftplugin/ch.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ch.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/clojure.vim b/ftplugin/clojure.vim index c04de2e3..6862f35d 100644 --- a/ftplugin/clojure.vim +++ b/ftplugin/clojure.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/clojure.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/cobol.vim b/ftplugin/cobol.vim index dec2d8c6..1441dfb0 100644 --- a/ftplugin/cobol.vim +++ b/ftplugin/cobol.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/cobol.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/coffee.vim b/ftplugin/coffee.vim index 86a3e82f..84fa245c 100644 --- a/ftplugin/coffee.vim +++ b/ftplugin/coffee.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/coffee.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/conf.vim b/ftplugin/conf.vim index 3e6a4573..244827cb 100644 --- a/ftplugin/conf.vim +++ b/ftplugin/conf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/conf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/config.vim b/ftplugin/config.vim index 050c6f00..dbd82347 100644 --- a/ftplugin/config.vim +++ b/ftplugin/config.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/config.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/crm.vim b/ftplugin/crm.vim index 83076461..0ca01cd8 100644 --- a/ftplugin/crm.vim +++ b/ftplugin/crm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/crm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/cryptol/folding.vim b/ftplugin/cryptol/folding.vim index d516f61f..1dcdc109 100644 --- a/ftplugin/cryptol/folding.vim +++ b/ftplugin/cryptol/folding.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/cryptol/folding.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/crystal.vim b/ftplugin/crystal.vim index eb8e8974..5f4e981b 100644 --- a/ftplugin/crystal.vim +++ b/ftplugin/crystal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/crystal.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/cs.vim b/ftplugin/cs.vim index 72dbdfe0..9ee46231 100644 --- a/ftplugin/cs.vim +++ b/ftplugin/cs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/cs.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/csc.vim b/ftplugin/csc.vim index 908a027a..b0648a81 100644 --- a/ftplugin/csc.vim +++ b/ftplugin/csc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/csc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/css.vim b/ftplugin/css.vim index 6209091b..50d8f714 100644 --- a/ftplugin/css.vim +++ b/ftplugin/css.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/css.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/csv.vim b/ftplugin/csv.vim index 125d06ed..40d5f95c 100644 --- a/ftplugin/csv.vim +++ b/ftplugin/csv.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/csv.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/cucumber.vim b/ftplugin/cucumber.vim index 10254153..94246791 100644 --- a/ftplugin/cucumber.vim +++ b/ftplugin/cucumber.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/cucumber.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/cvsrc.vim b/ftplugin/cvsrc.vim index 705787b9..84d059d7 100644 --- a/ftplugin/cvsrc.vim +++ b/ftplugin/cvsrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/cvsrc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/dart.vim b/ftplugin/dart.vim index 147e657d..52ac5bae 100644 --- a/ftplugin/dart.vim +++ b/ftplugin/dart.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/dart.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/debchangelog.vim b/ftplugin/debchangelog.vim index 355826f7..ba8b046b 100644 --- a/ftplugin/debchangelog.vim +++ b/ftplugin/debchangelog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/debchangelog.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/debcontrol.vim b/ftplugin/debcontrol.vim index 647d5942..767fbb8f 100644 --- a/ftplugin/debcontrol.vim +++ b/ftplugin/debcontrol.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/debcontrol.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/denyhosts.vim b/ftplugin/denyhosts.vim index 3cadf87f..35f1245b 100644 --- a/ftplugin/denyhosts.vim +++ b/ftplugin/denyhosts.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/denyhosts.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/dhall.vim b/ftplugin/dhall.vim index 983877c0..76a6bd22 100644 --- a/ftplugin/dhall.vim +++ b/ftplugin/dhall.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/dhall.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/dictconf.vim b/ftplugin/dictconf.vim index 22f10401..2b5467ce 100644 --- a/ftplugin/dictconf.vim +++ b/ftplugin/dictconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/dictconf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/dictdconf.vim b/ftplugin/dictdconf.vim index 8f229104..2d404814 100644 --- a/ftplugin/dictdconf.vim +++ b/ftplugin/dictdconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/dictdconf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/diff.vim b/ftplugin/diff.vim index 226956ca..d6ff42bc 100644 --- a/ftplugin/diff.vim +++ b/ftplugin/diff.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/diff.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/dircolors.vim b/ftplugin/dircolors.vim index b9b2549e..9043b649 100644 --- a/ftplugin/dircolors.vim +++ b/ftplugin/dircolors.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/dircolors.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/docker-compose.vim b/ftplugin/docker-compose.vim index 8e5c4fd3..df33d6fd 100644 --- a/ftplugin/docker-compose.vim +++ b/ftplugin/docker-compose.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/docker-compose.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/dockerfile.vim b/ftplugin/dockerfile.vim index 239fd78c..950a48bc 100644 --- a/ftplugin/dockerfile.vim +++ b/ftplugin/dockerfile.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/dockerfile.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/dosbatch.vim b/ftplugin/dosbatch.vim index a90f06b7..ada06865 100644 --- a/ftplugin/dosbatch.vim +++ b/ftplugin/dosbatch.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/dosbatch.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/dosini.vim b/ftplugin/dosini.vim index 3e2689c0..1a841bf6 100644 --- a/ftplugin/dosini.vim +++ b/ftplugin/dosini.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/dosini.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/dtd.vim b/ftplugin/dtd.vim index 71e7535a..26ad5061 100644 --- a/ftplugin/dtd.vim +++ b/ftplugin/dtd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/dtd.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/dune.vim b/ftplugin/dune.vim index 6a6a88e9..fde69ca6 100644 --- a/ftplugin/dune.vim +++ b/ftplugin/dune.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/dune.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ecrystal.vim b/ftplugin/ecrystal.vim index 0aa94254..d4854095 100644 --- a/ftplugin/ecrystal.vim +++ b/ftplugin/ecrystal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ecrystal.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/eelixir.vim b/ftplugin/eelixir.vim index 06b74eec..764ded0d 100644 --- a/ftplugin/eelixir.vim +++ b/ftplugin/eelixir.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/eelixir.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/elinks.vim b/ftplugin/elinks.vim index 57150b99..ed6cdd68 100644 --- a/ftplugin/elinks.vim +++ b/ftplugin/elinks.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/elinks.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/elixir.vim b/ftplugin/elixir.vim index 2889a446..db05c990 100644 --- a/ftplugin/elixir.vim +++ b/ftplugin/elixir.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/elixir.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/embeddedpuppet.vim b/ftplugin/embeddedpuppet.vim index 0a3ccf6f..c369e5c3 100644 --- a/ftplugin/embeddedpuppet.vim +++ b/ftplugin/embeddedpuppet.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/embeddedpuppet.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ember-script.vim b/ftplugin/ember-script.vim index a1436b7b..41f53442 100644 --- a/ftplugin/ember-script.vim +++ b/ftplugin/ember-script.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ember-script.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/emblem.vim b/ftplugin/emblem.vim index 7ddba5c2..655c843b 100644 --- a/ftplugin/emblem.vim +++ b/ftplugin/emblem.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/emblem.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/eruby.vim b/ftplugin/eruby.vim index cd3e8be1..3dc549ed 100644 --- a/ftplugin/eruby.vim +++ b/ftplugin/eruby.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/eruby.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/eterm.vim b/ftplugin/eterm.vim index 33fa42f6..135d75f8 100644 --- a/ftplugin/eterm.vim +++ b/ftplugin/eterm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/eterm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/falcon.vim b/ftplugin/falcon.vim index c1095b58..d278f58c 100644 --- a/ftplugin/falcon.vim +++ b/ftplugin/falcon.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/falcon.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/fennel.vim b/ftplugin/fennel.vim index 3dc46a7b..5fb9afb6 100644 --- a/ftplugin/fennel.vim +++ b/ftplugin/fennel.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/fennel.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/fetchmail.vim b/ftplugin/fetchmail.vim index a9d2abc9..a995bdfd 100644 --- a/ftplugin/fetchmail.vim +++ b/ftplugin/fetchmail.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/fetchmail.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/fish.vim b/ftplugin/fish.vim index 85bae2dc..e79c0669 100644 --- a/ftplugin/fish.vim +++ b/ftplugin/fish.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/fish.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/fortran.vim b/ftplugin/fortran.vim index ca1e4ab4..4c7d7cdf 100644 --- a/ftplugin/fortran.vim +++ b/ftplugin/fortran.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/fortran.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/framescript.vim b/ftplugin/framescript.vim index 48dd0d66..4ad99bf3 100644 --- a/ftplugin/framescript.vim +++ b/ftplugin/framescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/framescript.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/fvwm.vim b/ftplugin/fvwm.vim index ad662455..201a28b5 100644 --- a/ftplugin/fvwm.vim +++ b/ftplugin/fvwm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/fvwm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/gdb.vim b/ftplugin/gdb.vim index 49606b74..1f4ed1a8 100644 --- a/ftplugin/gdb.vim +++ b/ftplugin/gdb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/gdb.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/git.vim b/ftplugin/git.vim index b5401255..78352e84 100644 --- a/ftplugin/git.vim +++ b/ftplugin/git.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/git.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/gitcommit.vim b/ftplugin/gitcommit.vim index a770f911..cc5c4208 100644 --- a/ftplugin/gitcommit.vim +++ b/ftplugin/gitcommit.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/gitcommit.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/gitconfig.vim b/ftplugin/gitconfig.vim index 7d333642..f9a935d9 100644 --- a/ftplugin/gitconfig.vim +++ b/ftplugin/gitconfig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/gitconfig.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/gitignore.vim b/ftplugin/gitignore.vim index 09e7a5ed..ce45c58f 100644 --- a/ftplugin/gitignore.vim +++ b/ftplugin/gitignore.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/gitignore.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/gitrebase.vim b/ftplugin/gitrebase.vim index c471e505..8e217806 100644 --- a/ftplugin/gitrebase.vim +++ b/ftplugin/gitrebase.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/gitrebase.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/gitsendemail.vim b/ftplugin/gitsendemail.vim index 38fe9a94..1ef62bd3 100644 --- a/ftplugin/gitsendemail.vim +++ b/ftplugin/gitsendemail.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/gitsendemail.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/gpg.vim b/ftplugin/gpg.vim index bcac352d..8d142e8b 100644 --- a/ftplugin/gpg.vim +++ b/ftplugin/gpg.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/gpg.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/graphql.vim b/ftplugin/graphql.vim index 5a4aabb5..6a3cbf30 100644 --- a/ftplugin/graphql.vim +++ b/ftplugin/graphql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/graphql.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/groovy.vim b/ftplugin/groovy.vim index 5ad1d552..ae879781 100644 --- a/ftplugin/groovy.vim +++ b/ftplugin/groovy.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/groovy.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/group.vim b/ftplugin/group.vim index 82a90570..92aa848f 100644 --- a/ftplugin/group.vim +++ b/ftplugin/group.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/group.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/grub.vim b/ftplugin/grub.vim index 2e91a311..fe1a3fbd 100644 --- a/ftplugin/grub.vim +++ b/ftplugin/grub.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/grub.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/haml.vim b/ftplugin/haml.vim index c5b216e5..c262cc3a 100644 --- a/ftplugin/haml.vim +++ b/ftplugin/haml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/haml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/hamster.vim b/ftplugin/hamster.vim index c89527b6..341a762d 100644 --- a/ftplugin/hamster.vim +++ b/ftplugin/hamster.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/hamster.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/handlebars.vim b/ftplugin/handlebars.vim index ef56d4c1..2dfb1aeb 100644 --- a/ftplugin/handlebars.vim +++ b/ftplugin/handlebars.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/handlebars.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/hcl.vim b/ftplugin/hcl.vim index f7e9a57a..1c5a830a 100644 --- a/ftplugin/hcl.vim +++ b/ftplugin/hcl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/hcl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/help.vim b/ftplugin/help.vim index 92fc165c..b320d73a 100644 --- a/ftplugin/help.vim +++ b/ftplugin/help.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/help.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/hgcommit.vim b/ftplugin/hgcommit.vim index 6c449321..fbcf6143 100644 --- a/ftplugin/hgcommit.vim +++ b/ftplugin/hgcommit.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/hgcommit.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/hive.vim b/ftplugin/hive.vim index a95a17ad..f5884dd8 100644 --- a/ftplugin/hive.vim +++ b/ftplugin/hive.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/hive.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/hog.vim b/ftplugin/hog.vim index bd0ef9ff..edceb700 100644 --- a/ftplugin/hog.vim +++ b/ftplugin/hog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/hog.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/hostconf.vim b/ftplugin/hostconf.vim index 72b955bd..badef7ee 100644 --- a/ftplugin/hostconf.vim +++ b/ftplugin/hostconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/hostconf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/hostsaccess.vim b/ftplugin/hostsaccess.vim index 72434da3..60216fac 100644 --- a/ftplugin/hostsaccess.vim +++ b/ftplugin/hostsaccess.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/hostsaccess.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/html.vim b/ftplugin/html.vim index f78f9d77..df1e6a28 100644 --- a/ftplugin/html.vim +++ b/ftplugin/html.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/html.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/htmldjango.vim b/ftplugin/htmldjango.vim index 92ca3fe4..3e512e67 100644 --- a/ftplugin/htmldjango.vim +++ b/ftplugin/htmldjango.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/htmldjango.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/i3config.vim b/ftplugin/i3config.vim index 628d01ce..36b8b8f9 100644 --- a/ftplugin/i3config.vim +++ b/ftplugin/i3config.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/i3config.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/idris.vim b/ftplugin/idris.vim index 454591a5..9827033b 100644 --- a/ftplugin/idris.vim +++ b/ftplugin/idris.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/idris.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/idris2.vim b/ftplugin/idris2.vim index 7e39f23e..89395311 100644 --- a/ftplugin/idris2.vim +++ b/ftplugin/idris2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/idris2.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/indent.vim b/ftplugin/indent.vim index f426b9b3..5a0d6c35 100644 --- a/ftplugin/indent.vim +++ b/ftplugin/indent.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/indent.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ion.vim b/ftplugin/ion.vim index c6cfd8a5..9db5c7a2 100644 --- a/ftplugin/ion.vim +++ b/ftplugin/ion.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ion.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/j.vim b/ftplugin/j.vim index 9dd87d9d..577cbd9d 100644 --- a/ftplugin/j.vim +++ b/ftplugin/j.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/j.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/java.vim b/ftplugin/java.vim index 97a4af13..82953812 100644 --- a/ftplugin/java.vim +++ b/ftplugin/java.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/java.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/jproperties.vim b/ftplugin/jproperties.vim index f9c282c1..5839c997 100644 --- a/ftplugin/jproperties.vim +++ b/ftplugin/jproperties.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/jproperties.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/jq.vim b/ftplugin/jq.vim index 2fd91c55..fab7f20f 100644 --- a/ftplugin/jq.vim +++ b/ftplugin/jq.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/jq.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/json.vim b/ftplugin/json.vim index 682f24e9..9b2d9056 100644 --- a/ftplugin/json.vim +++ b/ftplugin/json.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/json.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/jsonnet.vim b/ftplugin/jsonnet.vim index b18fb7d4..4c35558e 100644 --- a/ftplugin/jsonnet.vim +++ b/ftplugin/jsonnet.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/jsonnet.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/jsp.vim b/ftplugin/jsp.vim index c5eb1ae7..9e186dc5 100644 --- a/ftplugin/jsp.vim +++ b/ftplugin/jsp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/jsp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/julia.vim b/ftplugin/julia.vim index 96aaca5b..48845421 100644 --- a/ftplugin/julia.vim +++ b/ftplugin/julia.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/julia.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/juliadoc.vim b/ftplugin/juliadoc.vim index 66c7f556..9212e287 100644 --- a/ftplugin/juliadoc.vim +++ b/ftplugin/juliadoc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/juliadoc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/kconfig.vim b/ftplugin/kconfig.vim index f25135f4..970e4abe 100644 --- a/ftplugin/kconfig.vim +++ b/ftplugin/kconfig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/kconfig.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/kotlin.vim b/ftplugin/kotlin.vim index 9c85505f..a9eb39cf 100644 --- a/ftplugin/kotlin.vim +++ b/ftplugin/kotlin.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/kotlin.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/kwt.vim b/ftplugin/kwt.vim index 152b8903..49953976 100644 --- a/ftplugin/kwt.vim +++ b/ftplugin/kwt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/kwt.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ld.vim b/ftplugin/ld.vim index 3a6d6647..1b9730d9 100644 --- a/ftplugin/ld.vim +++ b/ftplugin/ld.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ld.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/less.vim b/ftplugin/less.vim index eb9d5b84..1eabb7b3 100644 --- a/ftplugin/less.vim +++ b/ftplugin/less.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/less.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/lftp.vim b/ftplugin/lftp.vim index a3ee81a8..4f246ecd 100644 --- a/ftplugin/lftp.vim +++ b/ftplugin/lftp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/lftp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/libao.vim b/ftplugin/libao.vim index cf3469a5..154ac0ce 100644 --- a/ftplugin/libao.vim +++ b/ftplugin/libao.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/libao.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/lilypond.vim b/ftplugin/lilypond.vim index f8462fa3..0f19b5cf 100644 --- a/ftplugin/lilypond.vim +++ b/ftplugin/lilypond.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/lilypond.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/limits.vim b/ftplugin/limits.vim index 6dec8a52..6990030f 100644 --- a/ftplugin/limits.vim +++ b/ftplugin/limits.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/limits.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/liquid.vim b/ftplugin/liquid.vim index c7e42872..75b093b9 100644 --- a/ftplugin/liquid.vim +++ b/ftplugin/liquid.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/liquid.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/lisp.vim b/ftplugin/lisp.vim index 8de27ece..d706128c 100644 --- a/ftplugin/lisp.vim +++ b/ftplugin/lisp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/lisp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/litcoffee.vim b/ftplugin/litcoffee.vim index f0c84c70..6b70fe8b 100644 --- a/ftplugin/litcoffee.vim +++ b/ftplugin/litcoffee.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/litcoffee.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/llvm.vim b/ftplugin/llvm.vim index 109dbb51..dcb43a4b 100644 --- a/ftplugin/llvm.vim +++ b/ftplugin/llvm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/llvm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/logcheck.vim b/ftplugin/logcheck.vim index 1dbcf551..fb90af64 100644 --- a/ftplugin/logcheck.vim +++ b/ftplugin/logcheck.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/logcheck.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/loginaccess.vim b/ftplugin/loginaccess.vim index c2850aed..c9834df2 100644 --- a/ftplugin/loginaccess.vim +++ b/ftplugin/loginaccess.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/loginaccess.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/logindefs.vim b/ftplugin/logindefs.vim index c917bfb6..97ba09fc 100644 --- a/ftplugin/logindefs.vim +++ b/ftplugin/logindefs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/logindefs.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/logtalk.vim b/ftplugin/logtalk.vim index 6310b4c4..b4b58d36 100644 --- a/ftplugin/logtalk.vim +++ b/ftplugin/logtalk.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/logtalk.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/lprolog.vim b/ftplugin/lprolog.vim index edf3c23e..bdd1d5b1 100644 --- a/ftplugin/lprolog.vim +++ b/ftplugin/lprolog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/lprolog.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ls.vim b/ftplugin/ls.vim index 87eee4ba..eb3cc517 100644 --- a/ftplugin/ls.vim +++ b/ftplugin/ls.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ls.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/m4.vim b/ftplugin/m4.vim index 12c53b2f..7ead0f44 100644 --- a/ftplugin/m4.vim +++ b/ftplugin/m4.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/m4.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/mail.vim b/ftplugin/mail.vim index 567bb6f0..0fd2e39d 100644 --- a/ftplugin/mail.vim +++ b/ftplugin/mail.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/mail.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/mailaliases.vim b/ftplugin/mailaliases.vim index 9ac29c76..ed8ed24c 100644 --- a/ftplugin/mailaliases.vim +++ b/ftplugin/mailaliases.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/mailaliases.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/mailcap.vim b/ftplugin/mailcap.vim index 5da2d957..c3f7d665 100644 --- a/ftplugin/mailcap.vim +++ b/ftplugin/mailcap.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/mailcap.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/make.vim b/ftplugin/make.vim index 635c8126..a077f521 100644 --- a/ftplugin/make.vim +++ b/ftplugin/make.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/make.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/mako.vim b/ftplugin/mako.vim index a25fedf2..48cc40a1 100644 --- a/ftplugin/mako.vim +++ b/ftplugin/mako.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/mako.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/manconf.vim b/ftplugin/manconf.vim index 255f4f32..34b0173b 100644 --- a/ftplugin/manconf.vim +++ b/ftplugin/manconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/manconf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index 2936ac00..4209f306 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/markdown.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/meson.vim b/ftplugin/meson.vim index eb3105b5..41daf3ee 100644 --- a/ftplugin/meson.vim +++ b/ftplugin/meson.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/meson.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/mf.vim b/ftplugin/mf.vim index 4f63dc03..395ebe46 100644 --- a/ftplugin/mf.vim +++ b/ftplugin/mf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/mf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/mma.vim b/ftplugin/mma.vim index b22ce1c9..c173a1a2 100644 --- a/ftplugin/mma.vim +++ b/ftplugin/mma.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/mma.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/modconf.vim b/ftplugin/modconf.vim index bf73a0cc..121cf3f8 100644 --- a/ftplugin/modconf.vim +++ b/ftplugin/modconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/modconf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/moon.vim b/ftplugin/moon.vim index 09e9c7bc..997facd7 100644 --- a/ftplugin/moon.vim +++ b/ftplugin/moon.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/moon.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/mp.vim b/ftplugin/mp.vim index 2cf65bb1..18d539cb 100644 --- a/ftplugin/mp.vim +++ b/ftplugin/mp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/mp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/mplayerconf.vim b/ftplugin/mplayerconf.vim index a251ebf2..0a9a5b97 100644 --- a/ftplugin/mplayerconf.vim +++ b/ftplugin/mplayerconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/mplayerconf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/mrxvtrc.vim b/ftplugin/mrxvtrc.vim index bfe04c1c..66ed311c 100644 --- a/ftplugin/mrxvtrc.vim +++ b/ftplugin/mrxvtrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/mrxvtrc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/mustache.vim b/ftplugin/mustache.vim index 349ec236..c6d4b22d 100644 --- a/ftplugin/mustache.vim +++ b/ftplugin/mustache.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/mustache.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/muttrc.vim b/ftplugin/muttrc.vim index ebe86806..6efb6fe2 100644 --- a/ftplugin/muttrc.vim +++ b/ftplugin/muttrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/muttrc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/nanorc.vim b/ftplugin/nanorc.vim index 1363191c..d496dbe4 100644 --- a/ftplugin/nanorc.vim +++ b/ftplugin/nanorc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/nanorc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/neomuttrc.vim b/ftplugin/neomuttrc.vim index a63769cb..ef375cbd 100644 --- a/ftplugin/neomuttrc.vim +++ b/ftplugin/neomuttrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/neomuttrc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/netrc.vim b/ftplugin/netrc.vim index 071362e4..8f3ab865 100644 --- a/ftplugin/netrc.vim +++ b/ftplugin/netrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/netrc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/nginx.vim b/ftplugin/nginx.vim index 13a50b2a..ac28682b 100644 --- a/ftplugin/nginx.vim +++ b/ftplugin/nginx.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/nginx.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/nix.vim b/ftplugin/nix.vim index 7863be6d..c54c8234 100644 --- a/ftplugin/nix.vim +++ b/ftplugin/nix.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/nix.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/nroff.vim b/ftplugin/nroff.vim index 091fb018..2487c431 100644 --- a/ftplugin/nroff.vim +++ b/ftplugin/nroff.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/nroff.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/nsis.vim b/ftplugin/nsis.vim index edbe9192..eecf536f 100644 --- a/ftplugin/nsis.vim +++ b/ftplugin/nsis.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/nsis.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/oasis.vim b/ftplugin/oasis.vim index 0b2150d5..d8f3988c 100644 --- a/ftplugin/oasis.vim +++ b/ftplugin/oasis.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/oasis.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/objc.vim b/ftplugin/objc.vim index 909a1442..6f690a03 100644 --- a/ftplugin/objc.vim +++ b/ftplugin/objc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/objc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ocaml.vim b/ftplugin/ocaml.vim index 1c92e7d9..c3d952de 100644 --- a/ftplugin/ocaml.vim +++ b/ftplugin/ocaml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ocaml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ocamlbuild_tags.vim b/ftplugin/ocamlbuild_tags.vim index 373ee28f..75167bf7 100644 --- a/ftplugin/ocamlbuild_tags.vim +++ b/ftplugin/ocamlbuild_tags.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ocamlbuild_tags.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/occam.vim b/ftplugin/occam.vim index e5bf6b85..4a6d6aa9 100644 --- a/ftplugin/occam.vim +++ b/ftplugin/occam.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/occam.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/omake.vim b/ftplugin/omake.vim index c78d15d0..7b04a99a 100644 --- a/ftplugin/omake.vim +++ b/ftplugin/omake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/omake.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/opencl.vim b/ftplugin/opencl.vim index 39416e67..93132f10 100644 --- a/ftplugin/opencl.vim +++ b/ftplugin/opencl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/opencl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/pamconf.vim b/ftplugin/pamconf.vim index 7628224b..548c262a 100644 --- a/ftplugin/pamconf.vim +++ b/ftplugin/pamconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/pamconf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/pascal.vim b/ftplugin/pascal.vim index f33a1946..828e8d1e 100644 --- a/ftplugin/pascal.vim +++ b/ftplugin/pascal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/pascal.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/passwd.vim b/ftplugin/passwd.vim index 2e3ff220..3116758c 100644 --- a/ftplugin/passwd.vim +++ b/ftplugin/passwd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/passwd.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/pdf.vim b/ftplugin/pdf.vim index d2acbeaf..97d77deb 100644 --- a/ftplugin/pdf.vim +++ b/ftplugin/pdf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/pdf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/perl.vim b/ftplugin/perl.vim index e95319cc..5018676b 100644 --- a/ftplugin/perl.vim +++ b/ftplugin/perl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/perl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/pinfo.vim b/ftplugin/pinfo.vim index d76a1fed..86746f32 100644 --- a/ftplugin/pinfo.vim +++ b/ftplugin/pinfo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/pinfo.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/plantuml.vim b/ftplugin/plantuml.vim index acfd5e03..1ab7da13 100644 --- a/ftplugin/plantuml.vim +++ b/ftplugin/plantuml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/plantuml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/pony.vim b/ftplugin/pony.vim index bf1311f8..dee95d8e 100644 --- a/ftplugin/pony.vim +++ b/ftplugin/pony.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/pony.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/postscr.vim b/ftplugin/postscr.vim index 5539b765..66631393 100644 --- a/ftplugin/postscr.vim +++ b/ftplugin/postscr.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/postscr.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/procmail.vim b/ftplugin/procmail.vim index 38126994..1c82967e 100644 --- a/ftplugin/procmail.vim +++ b/ftplugin/procmail.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/procmail.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/prolog.vim b/ftplugin/prolog.vim index 1b92ed90..a2a50602 100644 --- a/ftplugin/prolog.vim +++ b/ftplugin/prolog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/prolog.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/protocols.vim b/ftplugin/protocols.vim index fa268d39..d8cd8f65 100644 --- a/ftplugin/protocols.vim +++ b/ftplugin/protocols.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/protocols.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ps1.vim b/ftplugin/ps1.vim index 5d1622c8..b6d98258 100644 --- a/ftplugin/ps1.vim +++ b/ftplugin/ps1.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ps1.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ps1xml.vim b/ftplugin/ps1xml.vim index a859e919..c9efc5ae 100644 --- a/ftplugin/ps1xml.vim +++ b/ftplugin/ps1xml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ps1xml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/pug.vim b/ftplugin/pug.vim index 7b58b2ed..3237029c 100644 --- a/ftplugin/pug.vim +++ b/ftplugin/pug.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/pug.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/puppet.vim b/ftplugin/puppet.vim index 0b9bd72d..42737508 100644 --- a/ftplugin/puppet.vim +++ b/ftplugin/puppet.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/puppet.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/puppet_tagbar.vim b/ftplugin/puppet_tagbar.vim index 68240b51..84751db1 100644 --- a/ftplugin/puppet_tagbar.vim +++ b/ftplugin/puppet_tagbar.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/puppet_tagbar.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/purescript.vim b/ftplugin/purescript.vim index 96be330b..b53af764 100644 --- a/ftplugin/purescript.vim +++ b/ftplugin/purescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/purescript.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/pyrex.vim b/ftplugin/pyrex.vim index 02b10684..6e275e3a 100644 --- a/ftplugin/pyrex.vim +++ b/ftplugin/pyrex.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/pyrex.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/qml.vim b/ftplugin/qml.vim index e61e983c..982b9ac7 100644 --- a/ftplugin/qml.vim +++ b/ftplugin/qml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/qml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/quake.vim b/ftplugin/quake.vim index 44e8f4f3..e3601fc8 100644 --- a/ftplugin/quake.vim +++ b/ftplugin/quake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/quake.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/racket.vim b/ftplugin/racket.vim index caf377cd..bc3d76c9 100644 --- a/ftplugin/racket.vim +++ b/ftplugin/racket.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/racket.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/raku.vim b/ftplugin/raku.vim index c16c536e..a56385d1 100644 --- a/ftplugin/raku.vim +++ b/ftplugin/raku.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/raku.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/raml.vim b/ftplugin/raml.vim index 7c83588e..ec1a3c4a 100644 --- a/ftplugin/raml.vim +++ b/ftplugin/raml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/raml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/razor.vim b/ftplugin/razor.vim index 8e6c86a5..8b229622 100644 --- a/ftplugin/razor.vim +++ b/ftplugin/razor.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/razor.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/readline.vim b/ftplugin/readline.vim index afb4d3a8..ea38cd55 100644 --- a/ftplugin/readline.vim +++ b/ftplugin/readline.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/readline.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/reva.vim b/ftplugin/reva.vim index 52665d59..d82461dc 100644 --- a/ftplugin/reva.vim +++ b/ftplugin/reva.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/reva.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/rmd.vim b/ftplugin/rmd.vim index e62efad6..b6a16c8c 100644 --- a/ftplugin/rmd.vim +++ b/ftplugin/rmd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/rmd.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/rnc.vim b/ftplugin/rnc.vim index 0ede84a3..4873a22d 100644 --- a/ftplugin/rnc.vim +++ b/ftplugin/rnc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/rnc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/rnoweb.vim b/ftplugin/rnoweb.vim index c04a9dc2..21efcbfe 100644 --- a/ftplugin/rnoweb.vim +++ b/ftplugin/rnoweb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/rnoweb.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/rpl.vim b/ftplugin/rpl.vim index 011bd945..af331849 100644 --- a/ftplugin/rpl.vim +++ b/ftplugin/rpl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/rpl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/rrst.vim b/ftplugin/rrst.vim index 95945a63..6c0d51d4 100644 --- a/ftplugin/rrst.vim +++ b/ftplugin/rrst.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/rrst.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/rst.vim b/ftplugin/rst.vim index d1d71c29..791de7b9 100644 --- a/ftplugin/rst.vim +++ b/ftplugin/rst.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/rst.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/ruby.vim b/ftplugin/ruby.vim index c20a08b2..5a7c6e7d 100644 --- a/ftplugin/ruby.vim +++ b/ftplugin/ruby.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/ruby.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/rust.vim b/ftplugin/rust.vim index 408a9199..780baf39 100644 --- a/ftplugin/rust.vim +++ b/ftplugin/rust.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/rust.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/rust/tagbar.vim b/ftplugin/rust/tagbar.vim index 875b766a..1301ca81 100644 --- a/ftplugin/rust/tagbar.vim +++ b/ftplugin/rust/tagbar.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/rust/tagbar.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/sass.vim b/ftplugin/sass.vim index a5b66a83..3f4acf6e 100644 --- a/ftplugin/sass.vim +++ b/ftplugin/sass.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/sass.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/sbt.vim b/ftplugin/sbt.vim index 017f63ab..260360c7 100644 --- a/ftplugin/sbt.vim +++ b/ftplugin/sbt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/sbt.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/scala.vim b/ftplugin/scala.vim index 0d569e10..c80daabb 100644 --- a/ftplugin/scala.vim +++ b/ftplugin/scala.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/scala.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/scala.xpt.vim b/ftplugin/scala.xpt.vim index b49230a1..9df57081 100644 --- a/ftplugin/scala.xpt.vim +++ b/ftplugin/scala.xpt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/scala.xpt.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/scala/tagbar.vim b/ftplugin/scala/tagbar.vim index a60bf235..8236d737 100644 --- a/ftplugin/scala/tagbar.vim +++ b/ftplugin/scala/tagbar.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/scala/tagbar.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/scheme.vim b/ftplugin/scheme.vim index 6b791eec..68ad8c8b 100644 --- a/ftplugin/scheme.vim +++ b/ftplugin/scheme.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/scheme.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/screen.vim b/ftplugin/screen.vim index 83e5f7e3..2acc4b87 100644 --- a/ftplugin/screen.vim +++ b/ftplugin/screen.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/screen.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/scss.vim b/ftplugin/scss.vim index 55db812a..abed20d5 100644 --- a/ftplugin/scss.vim +++ b/ftplugin/scss.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/scss.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/sensors.vim b/ftplugin/sensors.vim index cc91a810..dba05b65 100644 --- a/ftplugin/sensors.vim +++ b/ftplugin/sensors.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/sensors.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/services.vim b/ftplugin/services.vim index 2c0f414a..c4aaec81 100644 --- a/ftplugin/services.vim +++ b/ftplugin/services.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/services.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/setserial.vim b/ftplugin/setserial.vim index 50560bfe..4d588ae3 100644 --- a/ftplugin/setserial.vim +++ b/ftplugin/setserial.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/setserial.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/sexplib.vim b/ftplugin/sexplib.vim index 8b4029e2..16af8a15 100644 --- a/ftplugin/sexplib.vim +++ b/ftplugin/sexplib.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/sexplib.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/sieve.vim b/ftplugin/sieve.vim index b5d36392..9f59d80f 100644 --- a/ftplugin/sieve.vim +++ b/ftplugin/sieve.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/sieve.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/slim.vim b/ftplugin/slim.vim index e15389d9..184b54d3 100644 --- a/ftplugin/slim.vim +++ b/ftplugin/slim.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/slim.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/slpconf.vim b/ftplugin/slpconf.vim index 1140f20b..14fa5436 100644 --- a/ftplugin/slpconf.vim +++ b/ftplugin/slpconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/slpconf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/slpreg.vim b/ftplugin/slpreg.vim index ca09dfb5..e4b4580e 100644 --- a/ftplugin/slpreg.vim +++ b/ftplugin/slpreg.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/slpreg.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/slpspi.vim b/ftplugin/slpspi.vim index ef4722c9..9a042d4f 100644 --- a/ftplugin/slpspi.vim +++ b/ftplugin/slpspi.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/slpspi.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/smt2.vim b/ftplugin/smt2.vim index b39fe64d..86dfa720 100644 --- a/ftplugin/smt2.vim +++ b/ftplugin/smt2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/smt2.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/solidity.vim b/ftplugin/solidity.vim index 853c53d2..43bfb3f4 100644 --- a/ftplugin/solidity.vim +++ b/ftplugin/solidity.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/solidity.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/spec.vim b/ftplugin/spec.vim index 900b0e49..772e218a 100644 --- a/ftplugin/spec.vim +++ b/ftplugin/spec.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/spec.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/sql.vim b/ftplugin/sql.vim index befd023b..bd49428a 100644 --- a/ftplugin/sql.vim +++ b/ftplugin/sql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/sql.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/sshconfig.vim b/ftplugin/sshconfig.vim index 9519f30b..3c7c13fc 100644 --- a/ftplugin/sshconfig.vim +++ b/ftplugin/sshconfig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/sshconfig.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/stylus.vim b/ftplugin/stylus.vim index c39decc3..b5c8aaee 100644 --- a/ftplugin/stylus.vim +++ b/ftplugin/stylus.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/stylus.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/sudoers.vim b/ftplugin/sudoers.vim index 26ce5836..3a09305f 100644 --- a/ftplugin/sudoers.vim +++ b/ftplugin/sudoers.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/sudoers.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/svelte.vim b/ftplugin/svelte.vim index d8bd58d5..a7037418 100644 --- a/ftplugin/svelte.vim +++ b/ftplugin/svelte.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/svelte.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/swift.vim b/ftplugin/swift.vim index d1e1de89..798a6b19 100644 --- a/ftplugin/swift.vim +++ b/ftplugin/swift.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/swift.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/swiftgyb.vim b/ftplugin/swiftgyb.vim index 0870048b..87849112 100644 --- a/ftplugin/swiftgyb.vim +++ b/ftplugin/swiftgyb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/swiftgyb.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/sysctl.vim b/ftplugin/sysctl.vim index d8dca859..87e08de2 100644 --- a/ftplugin/sysctl.vim +++ b/ftplugin/sysctl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/sysctl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/systemd.vim b/ftplugin/systemd.vim index ee05ed2a..a4ff2eb1 100644 --- a/ftplugin/systemd.vim +++ b/ftplugin/systemd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/systemd.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/systemverilog.vim b/ftplugin/systemverilog.vim index 6b088c6c..4a322e03 100644 --- a/ftplugin/systemverilog.vim +++ b/ftplugin/systemverilog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/systemverilog.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/tablegen.vim b/ftplugin/tablegen.vim index 04b8c4e6..88516995 100644 --- a/ftplugin/tablegen.vim +++ b/ftplugin/tablegen.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/tablegen.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/tcl.vim b/ftplugin/tcl.vim index c2dfd035..e1a6bf3e 100644 --- a/ftplugin/tcl.vim +++ b/ftplugin/tcl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/tcl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/terminfo.vim b/ftplugin/terminfo.vim index ab948691..9150f8c9 100644 --- a/ftplugin/terminfo.vim +++ b/ftplugin/terminfo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/terminfo.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/terraform.vim b/ftplugin/terraform.vim index 8edc509d..2f6122c2 100644 --- a/ftplugin/terraform.vim +++ b/ftplugin/terraform.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/terraform.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/tex.vim b/ftplugin/tex.vim index b2ab4560..308b859a 100644 --- a/ftplugin/tex.vim +++ b/ftplugin/tex.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/tex.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/text.vim b/ftplugin/text.vim index 7c13d82f..58f151a8 100644 --- a/ftplugin/text.vim +++ b/ftplugin/text.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/text.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/textile.vim b/ftplugin/textile.vim index d260e848..6799e23a 100644 --- a/ftplugin/textile.vim +++ b/ftplugin/textile.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/textile.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/tmux.vim b/ftplugin/tmux.vim index 4965032b..53aafc80 100644 --- a/ftplugin/tmux.vim +++ b/ftplugin/tmux.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/tmux.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/toml.vim b/ftplugin/toml.vim index ce5a9fa1..9d489fbc 100644 --- a/ftplugin/toml.vim +++ b/ftplugin/toml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/toml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/treetop.vim b/ftplugin/treetop.vim index 628bd891..4069f641 100644 --- a/ftplugin/treetop.vim +++ b/ftplugin/treetop.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/treetop.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/tt2html.vim b/ftplugin/tt2html.vim index 6fb150fc..de8b6377 100644 --- a/ftplugin/tt2html.vim +++ b/ftplugin/tt2html.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/tt2html.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/twig.vim b/ftplugin/twig.vim index ea10d3db..52b14150 100644 --- a/ftplugin/twig.vim +++ b/ftplugin/twig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/twig.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/typescript.vim b/ftplugin/typescript.vim index b99f5d9b..fa14101b 100644 --- a/ftplugin/typescript.vim +++ b/ftplugin/typescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/typescript.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/typescriptreact.vim b/ftplugin/typescriptreact.vim index a52ab70c..159f91b0 100644 --- a/ftplugin/typescriptreact.vim +++ b/ftplugin/typescriptreact.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/typescriptreact.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/udevconf.vim b/ftplugin/udevconf.vim index e554c90b..ccfd7155 100644 --- a/ftplugin/udevconf.vim +++ b/ftplugin/udevconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/udevconf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/udevperm.vim b/ftplugin/udevperm.vim index 7fde3445..47e41555 100644 --- a/ftplugin/udevperm.vim +++ b/ftplugin/udevperm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/udevperm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/updatedb.vim b/ftplugin/updatedb.vim index 7dd6476f..f3bf376b 100644 --- a/ftplugin/updatedb.vim +++ b/ftplugin/updatedb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/updatedb.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/vala.vim b/ftplugin/vala.vim index 88f9ea7c..7c4fcddc 100644 --- a/ftplugin/vala.vim +++ b/ftplugin/vala.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/vala.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/vb.vim b/ftplugin/vb.vim index f591072e..2989165c 100644 --- a/ftplugin/vb.vim +++ b/ftplugin/vb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/vb.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/verilog.vim b/ftplugin/verilog.vim index ff1109e5..ed2fd707 100644 --- a/ftplugin/verilog.vim +++ b/ftplugin/verilog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/verilog.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/vhdl.vim b/ftplugin/vhdl.vim index 31aded2b..81c6cadf 100644 --- a/ftplugin/vhdl.vim +++ b/ftplugin/vhdl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/vhdl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/vlang.vim b/ftplugin/vlang.vim index 8c597249..0a04d5ea 100644 --- a/ftplugin/vlang.vim +++ b/ftplugin/vlang.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/vlang.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/vroom.vim b/ftplugin/vroom.vim index 835f1314..d13b5fe5 100644 --- a/ftplugin/vroom.vim +++ b/ftplugin/vroom.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/vroom.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/vue.vim b/ftplugin/vue.vim index e5bb5e43..36e5293c 100644 --- a/ftplugin/vue.vim +++ b/ftplugin/vue.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/vue.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/wast.vim b/ftplugin/wast.vim index 7936da97..f6a103c7 100644 --- a/ftplugin/wast.vim +++ b/ftplugin/wast.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/wast.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/xdefaults.vim b/ftplugin/xdefaults.vim index 83fa9f91..9431ee40 100644 --- a/ftplugin/xdefaults.vim +++ b/ftplugin/xdefaults.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/xdefaults.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/xf86conf.vim b/ftplugin/xf86conf.vim index 839dfaac..d44adb27 100644 --- a/ftplugin/xf86conf.vim +++ b/ftplugin/xf86conf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/xf86conf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/xhtml.vim b/ftplugin/xhtml.vim index 68151ffb..48c5ee71 100644 --- a/ftplugin/xhtml.vim +++ b/ftplugin/xhtml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/xhtml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/xinetd.vim b/ftplugin/xinetd.vim index 25af0607..f0e459d5 100644 --- a/ftplugin/xinetd.vim +++ b/ftplugin/xinetd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/xinetd.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/xmodmap.vim b/ftplugin/xmodmap.vim index e787380b..7a2216a2 100644 --- a/ftplugin/xmodmap.vim +++ b/ftplugin/xmodmap.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/xmodmap.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/xs.vim b/ftplugin/xs.vim index 95d8a228..0ebb13da 100644 --- a/ftplugin/xs.vim +++ b/ftplugin/xs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/xs.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/xsd.vim b/ftplugin/xsd.vim index f53f5bac..6b58eb29 100644 --- a/ftplugin/xsd.vim +++ b/ftplugin/xsd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/xsd.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/xslt.vim b/ftplugin/xslt.vim index 76735f0a..b4109e57 100644 --- a/ftplugin/xslt.vim +++ b/ftplugin/xslt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/xslt.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/yaml.vim b/ftplugin/yaml.vim index 44f716bf..5675a9e9 100644 --- a/ftplugin/yaml.vim +++ b/ftplugin/yaml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/yaml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/zig.vim b/ftplugin/zig.vim index 50f3aecd..79d177e2 100644 --- a/ftplugin/zig.vim +++ b/ftplugin/zig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/zig.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish diff --git a/ftplugin/zimbu.vim b/ftplugin/zimbu.vim index 6af9be4f..d6299685 100644 --- a/ftplugin/zimbu.vim +++ b/ftplugin/zimbu.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'ftplugin/zimbu.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = 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] finish |