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 | |
parent | 20b31f533764c4c32582124de8d8a6f6c9499c8a (diff) | |
download | vim-polyglot-d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1.tar.gz vim-polyglot-d73c4d156279bfbc2ea9fafcbacca5fc2bd6cfd1.zip |
Fix recursive loading, closes #605
1227 files changed, 3681 insertions, 1227 deletions
diff --git a/autoload/LaTeXtoUnicode.vim b/autoload/LaTeXtoUnicode.vim index 132437ed..f498e5df 100644 --- a/autoload/LaTeXtoUnicode.vim +++ b/autoload/LaTeXtoUnicode.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/LaTeXtoUnicode.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/LaTeXtoUnicode.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/RstFold.vim b/autoload/RstFold.vim index dc1044f7..926bc1b9 100644 --- a/autoload/RstFold.vim +++ b/autoload/RstFold.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/RstFold.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/RstFold.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/ada.vim b/autoload/ada.vim index e01b83ae..9a01456c 100644 --- a/autoload/ada.vim +++ b/autoload/ada.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/ada.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/cargo.vim b/autoload/cargo.vim index a8b35e73..068cfa89 100644 --- a/autoload/cargo.vim +++ b/autoload/cargo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/cargo.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/cargo.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/cargo/quickfix.vim b/autoload/cargo/quickfix.vim index 630928f5..7f3fffa1 100644 --- a/autoload/cargo/quickfix.vim +++ b/autoload/cargo/quickfix.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/cargo/quickfix.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/cargo/quickfix.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/clojurecomplete.vim b/autoload/clojurecomplete.vim index 70c1d4ce..02857c7b 100644 --- a/autoload/clojurecomplete.vim +++ b/autoload/clojurecomplete.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/clojurecomplete.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/clojurecomplete.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/coffee.vim b/autoload/coffee.vim index c3376640..0388a589 100644 --- a/autoload/coffee.vim +++ b/autoload/coffee.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/coffee.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/crystal/indent.vim b/autoload/crystal/indent.vim index d50c6e29..fbbf91fd 100644 --- a/autoload/crystal/indent.vim +++ b/autoload/crystal/indent.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/crystal/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, 'autoload/crystal/indent.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/crystal_lang.vim b/autoload/crystal_lang.vim index 3b10ecbd..1a1ad421 100644 --- a/autoload/crystal_lang.vim +++ b/autoload/crystal_lang.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/crystal_lang.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/crystal_lang.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/csv.vim b/autoload/csv.vim index a5116306..692ec2a3 100644 --- a/autoload/csv.vim +++ b/autoload/csv.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/csv.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/dart.vim b/autoload/dart.vim index bbb1de21..ccd29b44 100644 --- a/autoload/dart.vim +++ b/autoload/dart.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/dart.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/db/adapter/ecto.vim b/autoload/db/adapter/ecto.vim index f97301e9..7eca1262 100644 --- a/autoload/db/adapter/ecto.vim +++ b/autoload/db/adapter/ecto.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/db/adapter/ecto.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/db/adapter/ecto.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/ecrystal.vim b/autoload/ecrystal.vim index 658d5bd8..5225c753 100644 --- a/autoload/ecrystal.vim +++ b/autoload/ecrystal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/ecrystal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/elixir/indent.vim b/autoload/elixir/indent.vim index 61015846..ccd02881 100644 --- a/autoload/elixir/indent.vim +++ b/autoload/elixir/indent.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/elixir/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, 'autoload/elixir/indent.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/elixir/util.vim b/autoload/elixir/util.vim index de7972de..7acc8814 100644 --- a/autoload/elixir/util.vim +++ b/autoload/elixir/util.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/elixir/util.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/elixir/util.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/fish.vim b/autoload/fish.vim index 2cc6fcfb..fb2dda13 100644 --- a/autoload/fish.vim +++ b/autoload/fish.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/fish.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/fsharp.vim b/autoload/fsharp.vim index a7abc1d7..0331814c 100644 --- a/autoload/fsharp.vim +++ b/autoload/fsharp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/fsharp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/fsharp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/fzf_gitignore.vim b/autoload/fzf_gitignore.vim index a482c030..bd90be48 100644 --- a/autoload/fzf_gitignore.vim +++ b/autoload/fzf_gitignore.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/fzf_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, 'autoload/fzf_gitignore.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/go/config.vim b/autoload/go/config.vim index c58b983a..3ddde740 100644 --- a/autoload/go/config.vim +++ b/autoload/go/config.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/go/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, 'autoload/go/config.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/graphql.vim b/autoload/graphql.vim index 49c63437..b5ddd9fa 100644 --- a/autoload/graphql.vim +++ b/autoload/graphql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/graphql.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/htmlcomplete.vim b/autoload/htmlcomplete.vim index ae83ea68..7db1fdb9 100644 --- a/autoload/htmlcomplete.vim +++ b/autoload/htmlcomplete.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/htmlcomplete.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/htmlcomplete.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/jsonnet.vim b/autoload/jsonnet.vim index 0f1272db..c05e2f86 100644 --- a/autoload/jsonnet.vim +++ b/autoload/jsonnet.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/jsonnet.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/jsx_pretty/comment.vim b/autoload/jsx_pretty/comment.vim index 15442453..5a9db367 100644 --- a/autoload/jsx_pretty/comment.vim +++ b/autoload/jsx_pretty/comment.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/jsx_pretty/comment.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/jsx_pretty/comment.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/jsx_pretty/indent.vim b/autoload/jsx_pretty/indent.vim index 77d62038..34f88db0 100644 --- a/autoload/jsx_pretty/indent.vim +++ b/autoload/jsx_pretty/indent.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/jsx_pretty/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, 'autoload/jsx_pretty/indent.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/julia.vim b/autoload/julia.vim index daaa9f44..d76454a4 100644 --- a/autoload/julia.vim +++ b/autoload/julia.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/julia.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/julia/doc.vim b/autoload/julia/doc.vim index 7e6b5d31..e9e77d8c 100644 --- a/autoload/julia/doc.vim +++ b/autoload/julia/doc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/julia/doc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/julia/doc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/julia_blocks.vim b/autoload/julia_blocks.vim index 634462d6..7dd87df9 100644 --- a/autoload/julia_blocks.vim +++ b/autoload/julia_blocks.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/julia_blocks.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/julia_blocks.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/julia_latex_symbols.vim b/autoload/julia_latex_symbols.vim index 23101f78..5f4c9890 100644 --- a/autoload/julia_latex_symbols.vim +++ b/autoload/julia_latex_symbols.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/julia_latex_symbols.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/julia_latex_symbols.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/ledger.vim b/autoload/ledger.vim index cb7acfe7..badcb175 100644 --- a/autoload/ledger.vim +++ b/autoload/ledger.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/ledger.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/ledger.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/nim.vim b/autoload/nim.vim index cf7bb378..fdf990fc 100644 --- a/autoload/nim.vim +++ b/autoload/nim.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/nim.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/nim.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/pony.vim b/autoload/pony.vim index 85506e8b..5f26c52b 100644 --- a/autoload/pony.vim +++ b/autoload/pony.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/pony.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/puppet/align.vim b/autoload/puppet/align.vim index 712b686b..4fafac3d 100644 --- a/autoload/puppet/align.vim +++ b/autoload/puppet/align.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/puppet/align.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/puppet/align.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/puppet/ctags.vim b/autoload/puppet/ctags.vim index a86490bb..fad4f87a 100644 --- a/autoload/puppet/ctags.vim +++ b/autoload/puppet/ctags.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/puppet/ctags.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/puppet/ctags.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/puppet/format.vim b/autoload/puppet/format.vim index 50337849..94fe42e7 100644 --- a/autoload/puppet/format.vim +++ b/autoload/puppet/format.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/puppet/format.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/puppet/format.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/python/utils.vim b/autoload/python/utils.vim index 283d785a..4a02520d 100644 --- a/autoload/python/utils.vim +++ b/autoload/python/utils.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/python/utils.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/python/utils.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/requirements.vim b/autoload/requirements.vim index 79be715c..e945a652 100644 --- a/autoload/requirements.vim +++ b/autoload/requirements.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/requirements.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/requirements.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/rubycomplete.vim b/autoload/rubycomplete.vim index 1e8a6f0d..0b8871cb 100644 --- a/autoload/rubycomplete.vim +++ b/autoload/rubycomplete.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/rubycomplete.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/rubycomplete.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/rust.vim b/autoload/rust.vim index bab6a11f..b8bef48d 100644 --- a/autoload/rust.vim +++ b/autoload/rust.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/rust.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/rust/debugging.vim b/autoload/rust/debugging.vim index 3ddcc63c..d16380b5 100644 --- a/autoload/rust/debugging.vim +++ b/autoload/rust/debugging.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/rust/debugging.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/rust/debugging.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/rust/delimitmate.vim b/autoload/rust/delimitmate.vim index c605742b..a60dece7 100644 --- a/autoload/rust/delimitmate.vim +++ b/autoload/rust/delimitmate.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/rust/delimitmate.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/rust/delimitmate.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/rust/tags.vim b/autoload/rust/tags.vim index 10ce9440..84388174 100644 --- a/autoload/rust/tags.vim +++ b/autoload/rust/tags.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/rust/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, 'autoload/rust/tags.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/rustfmt.vim b/autoload/rustfmt.vim index c847219b..2e2a10da 100644 --- a/autoload/rustfmt.vim +++ b/autoload/rustfmt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/rustfmt.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/rustfmt.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/smt2.vim b/autoload/smt2.vim index b081d345..7a9fa7f8 100644 --- a/autoload/smt2.vim +++ b/autoload/smt2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/smt2.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/terraform.vim b/autoload/terraform.vim index 2380a395..e780440b 100644 --- a/autoload/terraform.vim +++ b/autoload/terraform.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/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, 'autoload/terraform.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/_crystal.vim b/autoload/vital/_crystal.vim index ffa30240..b8ac5d32 100644 --- a/autoload/vital/_crystal.vim +++ b/autoload/vital/_crystal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/_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, 'autoload/vital/_crystal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/_crystal/ColorEcho.vim b/autoload/vital/_crystal/ColorEcho.vim index 58996327..59c0ec88 100644 --- a/autoload/vital/_crystal/ColorEcho.vim +++ b/autoload/vital/_crystal/ColorEcho.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/ColorEcho.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/vital/_crystal/ColorEcho.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/_crystal/Data/List.vim b/autoload/vital/_crystal/Data/List.vim index 06461525..b2045a2a 100644 --- a/autoload/vital/_crystal/Data/List.vim +++ b/autoload/vital/_crystal/Data/List.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Data/List.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Data/List.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/_crystal/Data/String.vim b/autoload/vital/_crystal/Data/String.vim index 7e6ced35..8f6ddf3e 100644 --- a/autoload/vital/_crystal/Data/String.vim +++ b/autoload/vital/_crystal/Data/String.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Data/String.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Data/String.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/_crystal/Process.vim b/autoload/vital/_crystal/Process.vim index a7bbedad..315a4343 100644 --- a/autoload/vital/_crystal/Process.vim +++ b/autoload/vital/_crystal/Process.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Process.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Process.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/_crystal/Web/JSON.vim b/autoload/vital/_crystal/Web/JSON.vim index 891bd2dc..c17269cf 100644 --- a/autoload/vital/_crystal/Web/JSON.vim +++ b/autoload/vital/_crystal/Web/JSON.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/_crystal/Web/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, 'autoload/vital/_crystal/Web/JSON.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/vital/crystal.vim b/autoload/vital/crystal.vim index ca8c320e..7674c4ef 100644 --- a/autoload/vital/crystal.vim +++ b/autoload/vital/crystal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/vital/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, 'autoload/vital/crystal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/xml/aria.vim b/autoload/xml/aria.vim index 1cd801fe..ff8a071c 100644 --- a/autoload/xml/aria.vim +++ b/autoload/xml/aria.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/xml/aria.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/xml/aria.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/xml/html5.vim b/autoload/xml/html5.vim index 6e526be6..7bbc9586 100644 --- a/autoload/xml/html5.vim +++ b/autoload/xml/html5.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/xml/html5.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/xml/html5.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/xml/xsd.vim b/autoload/xml/xsd.vim index ad3630da..5757ae84 100644 --- a/autoload/xml/xsd.vim +++ b/autoload/xml/xsd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/xml/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, 'autoload/xml/xsd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/zig/config.vim b/autoload/zig/config.vim index d4f1a298..a35e73e8 100644 --- a/autoload/zig/config.vim +++ b/autoload/zig/config.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/zig/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, 'autoload/zig/config.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/zig/fmt.vim b/autoload/zig/fmt.vim index b1ec0bbe..c148ca2b 100644 --- a/autoload/zig/fmt.vim +++ b/autoload/zig/fmt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/zig/fmt.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/zig/fmt.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/zig/list.vim b/autoload/zig/list.vim index 8ab57d42..382a9882 100644 --- a/autoload/zig/list.vim +++ b/autoload/zig/list.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/zig/list.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/zig/list.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/autoload/zig/util.vim b/autoload/zig/util.vim index 23d45758..0c803802 100644 --- a/autoload/zig/util.vim +++ b/autoload/zig/util.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'autoload/zig/util.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'autoload/zig/util.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/ant.vim b/compiler/ant.vim index a893daaa..32470076 100644 --- a/compiler/ant.vim +++ b/compiler/ant.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/ant.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/bdf.vim b/compiler/bdf.vim index 04903c2c..2bf1c12f 100644 --- a/compiler/bdf.vim +++ b/compiler/bdf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/bdf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/cake.vim b/compiler/cake.vim index 3ebcd187..d3ac35d3 100644 --- a/compiler/cake.vim +++ b/compiler/cake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/cake.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/cake.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/cargo.vim b/compiler/cargo.vim index f33a0a4c..c8719dc9 100644 --- a/compiler/cargo.vim +++ b/compiler/cargo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/cargo.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/cargo.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/coffee.vim b/compiler/coffee.vim index 8193a4a5..a9e1a6bf 100644 --- a/compiler/coffee.vim +++ b/compiler/coffee.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/coffee.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/credo.vim b/compiler/credo.vim index 5ad1f452..801e79d9 100644 --- a/compiler/credo.vim +++ b/compiler/credo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/credo.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/credo.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/cryptol.vim b/compiler/cryptol.vim index 3dca5026..8cc53f38 100644 --- a/compiler/cryptol.vim +++ b/compiler/cryptol.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/cryptol.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/cryptol.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/cs.vim b/compiler/cs.vim index feea9751..04a6938b 100644 --- a/compiler/cs.vim +++ b/compiler/cs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/cs.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/cucumber.vim b/compiler/cucumber.vim index c0ddbc6d..4a4eba7e 100644 --- a/compiler/cucumber.vim +++ b/compiler/cucumber.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/cucumber.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/dot.vim b/compiler/dot.vim index 34be342a..e1fc35ed 100644 --- a/compiler/dot.vim +++ b/compiler/dot.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/dot.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/dot.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/eruby.vim b/compiler/eruby.vim index 5d75d869..b50b655a 100644 --- a/compiler/eruby.vim +++ b/compiler/eruby.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/eruby.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/exunit.vim b/compiler/exunit.vim index 8f6d3112..97ea0341 100644 --- a/compiler/exunit.vim +++ b/compiler/exunit.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/exunit.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/exunit.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/fish.vim b/compiler/fish.vim index 797abcc9..6dfb84f9 100644 --- a/compiler/fish.vim +++ b/compiler/fish.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/fish.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/go.vim b/compiler/go.vim index 6a83f3dd..1d7b873e 100644 --- a/compiler/go.vim +++ b/compiler/go.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/go.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/go.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/gradle.vim b/compiler/gradle.vim index aa5b1917..5fdb164a 100644 --- a/compiler/gradle.vim +++ b/compiler/gradle.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/gradle.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/gradle.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/gradlew.vim b/compiler/gradlew.vim index 932ace2c..3cfd0e80 100644 --- a/compiler/gradlew.vim +++ b/compiler/gradlew.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/gradlew.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/gradlew.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/haml.vim b/compiler/haml.vim index 5593c272..415a579c 100644 --- a/compiler/haml.vim +++ b/compiler/haml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/haml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/ledger.vim b/compiler/ledger.vim index f74a27a2..70b89925 100644 --- a/compiler/ledger.vim +++ b/compiler/ledger.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/ledger.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/ledger.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/lilypond.vim b/compiler/lilypond.vim index 986c2781..2ae68a3b 100644 --- a/compiler/lilypond.vim +++ b/compiler/lilypond.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/lilypond.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/ls.vim b/compiler/ls.vim index ab6b1c12..d177eaa3 100644 --- a/compiler/ls.vim +++ b/compiler/ls.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/ls.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/mix.vim b/compiler/mix.vim index 13dd1340..9ba5216b 100644 --- a/compiler/mix.vim +++ b/compiler/mix.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/mix.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/mix.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/nim.vim b/compiler/nim.vim index b15e7221..1b8c21b1 100644 --- a/compiler/nim.vim +++ b/compiler/nim.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/nim.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/nim.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/nix-build.vim b/compiler/nix-build.vim index 9766965a..0eb5f694 100644 --- a/compiler/nix-build.vim +++ b/compiler/nix-build.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/nix-build.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/nix-build.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/ocaml.vim b/compiler/ocaml.vim index ad3186d9..a9170be5 100644 --- a/compiler/ocaml.vim +++ b/compiler/ocaml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/ocaml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/powershell.vim b/compiler/powershell.vim index 13e56ddf..9cab203c 100644 --- a/compiler/powershell.vim +++ b/compiler/powershell.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/powershell.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/powershell.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/python.vim b/compiler/python.vim index f453919c..1a82a1cd 100644 --- a/compiler/python.vim +++ b/compiler/python.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/python.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/python.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/rake.vim b/compiler/rake.vim index 05fce7bf..acd08a35 100644 --- a/compiler/rake.vim +++ b/compiler/rake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/rake.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/rake.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/rspec.vim b/compiler/rspec.vim index 7b696c8e..c3b4ea0e 100644 --- a/compiler/rspec.vim +++ b/compiler/rspec.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/rspec.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/rspec.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/ruby.vim b/compiler/ruby.vim index 4fe2817f..8f0127c9 100644 --- a/compiler/ruby.vim +++ b/compiler/ruby.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/ruby.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/rubyunit.vim b/compiler/rubyunit.vim index 862de9dc..417b49c3 100644 --- a/compiler/rubyunit.vim +++ b/compiler/rubyunit.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/rubyunit.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/rubyunit.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/rustc.vim b/compiler/rustc.vim index f9da25f2..f9953732 100644 --- a/compiler/rustc.vim +++ b/compiler/rustc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/rustc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/rustc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/sass.vim b/compiler/sass.vim index 1f066873..bf02fa84 100644 --- a/compiler/sass.vim +++ b/compiler/sass.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/sass.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/sbt.vim b/compiler/sbt.vim index f6333af5..7bb2b1f9 100644 --- a/compiler/sbt.vim +++ b/compiler/sbt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/sbt.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/swift.vim b/compiler/swift.vim index c90b3fa2..441d7b2f 100644 --- a/compiler/swift.vim +++ b/compiler/swift.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/swift.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/tcl.vim b/compiler/tcl.vim index e1d7779e..184e17bb 100644 --- a/compiler/tcl.vim +++ b/compiler/tcl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/tcl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/tex.vim b/compiler/tex.vim index 6f974124..6d50eacd 100644 --- a/compiler/tex.vim +++ b/compiler/tex.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/tex.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/tidy.vim b/compiler/tidy.vim index ba44ce83..380c8d88 100644 --- a/compiler/tidy.vim +++ b/compiler/tidy.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/tidy.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'compiler/tidy.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/compiler/typescript.vim b/compiler/typescript.vim index e4860092..de3f1f0a 100644 --- a/compiler/typescript.vim +++ b/compiler/typescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'compiler/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, 'compiler/typescript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/extras/flow.vim b/extras/flow.vim index 5b9db538..458067d4 100644 --- a/extras/flow.vim +++ b/extras/flow.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'extras/flow.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'extras/flow.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/extras/jsdoc.vim b/extras/jsdoc.vim index d65badb2..63b816aa 100644 --- a/extras/jsdoc.vim +++ b/extras/jsdoc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'extras/jsdoc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'extras/jsdoc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/extras/ngdoc.vim b/extras/ngdoc.vim index 9ef79925..22a1a590 100644 --- a/extras/ngdoc.vim +++ b/extras/ngdoc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'extras/ngdoc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'extras/ngdoc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish 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 diff --git a/indent/Jenkinsfile.vim b/indent/Jenkinsfile.vim index 28602479..438d6991 100644 --- a/indent/Jenkinsfile.vim +++ b/indent/Jenkinsfile.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/Jenkinsfile.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/Jenkinsfile.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/aap.vim b/indent/aap.vim index 41140ace..799112c8 100644 --- a/indent/aap.vim +++ b/indent/aap.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/aap.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/ada.vim b/indent/ada.vim index 249c7afa..3240a795 100644 --- a/indent/ada.vim +++ b/indent/ada.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/ada.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/ansible.vim b/indent/ansible.vim index 2632f893..6686d9ab 100644 --- a/indent/ansible.vim +++ b/indent/ansible.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/ansible.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/ant.vim b/indent/ant.vim index fc948477..d0af9c74 100644 --- a/indent/ant.vim +++ b/indent/ant.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/ant.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/applescript.vim b/indent/applescript.vim index d58e92cc..0e31d286 100644 --- a/indent/applescript.vim +++ b/indent/applescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/applescript.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/applescript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/arduino.vim b/indent/arduino.vim index a265ea02..90c72c7c 100644 --- a/indent/arduino.vim +++ b/indent/arduino.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/arduino.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/arduino.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/autohotkey.vim b/indent/autohotkey.vim index 1d0a0936..354ceeb9 100644 --- a/indent/autohotkey.vim +++ b/indent/autohotkey.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/autohotkey.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/autohotkey.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/automake.vim b/indent/automake.vim index 27272c5e..4bded6f7 100644 --- a/indent/automake.vim +++ b/indent/automake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/automake.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/awk.vim b/indent/awk.vim index 17082d35..5e802ecd 100644 --- a/indent/awk.vim +++ b/indent/awk.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/awk.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/bib.vim b/indent/bib.vim index 802fa688..619859fc 100644 --- a/indent/bib.vim +++ b/indent/bib.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/bib.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/bib.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/blade.vim b/indent/blade.vim index 0ab2e45c..efdecf32 100644 --- a/indent/blade.vim +++ b/indent/blade.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/blade.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/bst.vim b/indent/bst.vim index ac2f9bfe..adc852ae 100644 --- a/indent/bst.vim +++ b/indent/bst.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/bst.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/bzl.vim b/indent/bzl.vim index deea163c..e41ba9c9 100644 --- a/indent/bzl.vim +++ b/indent/bzl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/bzl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/cabal.vim b/indent/cabal.vim index b81a8277..1698e16d 100644 --- a/indent/cabal.vim +++ b/indent/cabal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/cabal.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/cabal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/caddyfile.vim b/indent/caddyfile.vim index b3a5c20e..11980473 100644 --- a/indent/caddyfile.vim +++ b/indent/caddyfile.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/caddyfile.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/cdl.vim b/indent/cdl.vim index 8f9ded85..3f69f349 100644 --- a/indent/cdl.vim +++ b/indent/cdl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/cdl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/cdl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/ch.vim b/indent/ch.vim index 023fff0a..0b606769 100644 --- a/indent/ch.vim +++ b/indent/ch.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/ch.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/chaiscript.vim b/indent/chaiscript.vim index 367f462c..967f4ce0 100644 --- a/indent/chaiscript.vim +++ b/indent/chaiscript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/chaiscript.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/chaiscript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/clojure.vim b/indent/clojure.vim index 2b06814c..c2dd0cdc 100644 --- a/indent/clojure.vim +++ b/indent/clojure.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/clojure.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/cmake.vim b/indent/cmake.vim index dd7cd9b4..30af204e 100644 --- a/indent/cmake.vim +++ b/indent/cmake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/cmake.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/cmake.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/cobol.vim b/indent/cobol.vim index 9d17a6f7..e09bc85b 100644 --- a/indent/cobol.vim +++ b/indent/cobol.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/cobol.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/coffee.vim b/indent/coffee.vim index 790bc2ce..dca66e4e 100644 --- a/indent/coffee.vim +++ b/indent/coffee.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/coffee.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/config.vim b/indent/config.vim index 73d5c09c..4a500a02 100644 --- a/indent/config.vim +++ b/indent/config.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/config.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/crystal.vim b/indent/crystal.vim index 3c554a3f..c405f358 100644 --- a/indent/crystal.vim +++ b/indent/crystal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/crystal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/cs.vim b/indent/cs.vim index fd8f49de..dad26529 100644 --- a/indent/cs.vim +++ b/indent/cs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/cs.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/css.vim b/indent/css.vim index 5b8dc7d2..33131747 100644 --- a/indent/css.vim +++ b/indent/css.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/css.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/cucumber.vim b/indent/cucumber.vim index a564e254..52fad848 100644 --- a/indent/cucumber.vim +++ b/indent/cucumber.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/cucumber.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/cuda.vim b/indent/cuda.vim index 69684363..c878c472 100644 --- a/indent/cuda.vim +++ b/indent/cuda.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/cuda.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/cuda.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/cython.vim b/indent/cython.vim index 39bc24da..c8b0e997 100644 --- a/indent/cython.vim +++ b/indent/cython.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/cython.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/cython.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/d.vim b/indent/d.vim index 8fff519e..7a0a195d 100644 --- a/indent/d.vim +++ b/indent/d.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/d.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/d.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/dart.vim b/indent/dart.vim index 87b3bbef..aa9d99f9 100644 --- a/indent/dart.vim +++ b/indent/dart.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/dart.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/dictconf.vim b/indent/dictconf.vim index d2035d80..478d2b4c 100644 --- a/indent/dictconf.vim +++ b/indent/dictconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/dictconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/dictdconf.vim b/indent/dictdconf.vim index 891334e9..fc948939 100644 --- a/indent/dictdconf.vim +++ b/indent/dictdconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/dictdconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/dosbatch.vim b/indent/dosbatch.vim index 1baee719..60949dda 100644 --- a/indent/dosbatch.vim +++ b/indent/dosbatch.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/dosbatch.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/dtd.vim b/indent/dtd.vim index 9c035ee5..7dfe14db 100644 --- a/indent/dtd.vim +++ b/indent/dtd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/dtd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/dune.vim b/indent/dune.vim index a0b2c3c3..563ed198 100644 --- a/indent/dune.vim +++ b/indent/dune.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/dune.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/dylan.vim b/indent/dylan.vim index 39fc5830..f5a9c835 100644 --- a/indent/dylan.vim +++ b/indent/dylan.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/dylan.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/dylan.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/ecrystal.vim b/indent/ecrystal.vim index 8bd3580e..2bca7b1b 100644 --- a/indent/ecrystal.vim +++ b/indent/ecrystal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/ecrystal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/eelixir.vim b/indent/eelixir.vim index cf0b5461..f45af493 100644 --- a/indent/eelixir.vim +++ b/indent/eelixir.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/eelixir.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/elixir.vim b/indent/elixir.vim index 762516c7..a2854f17 100644 --- a/indent/elixir.vim +++ b/indent/elixir.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/elixir.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/elm.vim b/indent/elm.vim index a29a253e..731f8f87 100644 --- a/indent/elm.vim +++ b/indent/elm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/elm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/elm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/ember-script.vim b/indent/ember-script.vim index 46595215..de519c34 100644 --- a/indent/ember-script.vim +++ b/indent/ember-script.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/ember-script.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/emblem.vim b/indent/emblem.vim index ba4673b1..7653e6fb 100644 --- a/indent/emblem.vim +++ b/indent/emblem.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/emblem.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/erlang.vim b/indent/erlang.vim index 537b52f5..b66ccd59 100644 --- a/indent/erlang.vim +++ b/indent/erlang.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/erlang.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/erlang.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/eruby.vim b/indent/eruby.vim index 16f4b8f5..7ba4bf52 100644 --- a/indent/eruby.vim +++ b/indent/eruby.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/eruby.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/eterm.vim b/indent/eterm.vim index 87a3cd89..e0b391ef 100644 --- a/indent/eterm.vim +++ b/indent/eterm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/eterm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/falcon.vim b/indent/falcon.vim index 388a508c..bdd716a2 100644 --- a/indent/falcon.vim +++ b/indent/falcon.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/falcon.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/fennel.vim b/indent/fennel.vim index 9a85f3b2..cddb5827 100644 --- a/indent/fennel.vim +++ b/indent/fennel.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/fennel.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/fish.vim b/indent/fish.vim index a5e2ab07..f62375fb 100644 --- a/indent/fish.vim +++ b/indent/fish.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/fish.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/fortran.vim b/indent/fortran.vim index f56af8ee..cb00f26d 100644 --- a/indent/fortran.vim +++ b/indent/fortran.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/fortran.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/framescript.vim b/indent/framescript.vim index ae2a2026..de80fd70 100644 --- a/indent/framescript.vim +++ b/indent/framescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/framescript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/fsharp.vim b/indent/fsharp.vim index e743cfb3..cb4af8cc 100644 --- a/indent/fsharp.vim +++ b/indent/fsharp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/fsharp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/fsharp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/gdscript3.vim b/indent/gdscript3.vim index f481ef71..7fb7c84f 100644 --- a/indent/gdscript3.vim +++ b/indent/gdscript3.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/gdscript3.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/gdscript3.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/gitconfig.vim b/indent/gitconfig.vim index 4eb4b0e7..8155b3c7 100644 --- a/indent/gitconfig.vim +++ b/indent/gitconfig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/gitconfig.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/gitolite.vim b/indent/gitolite.vim index 6a990ec6..d0f3e820 100644 --- a/indent/gitolite.vim +++ b/indent/gitolite.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/gitolite.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/gitolite.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/glsl.vim b/indent/glsl.vim index 34437a03..442db43d 100644 --- a/indent/glsl.vim +++ b/indent/glsl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/glsl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/glsl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/go.vim b/indent/go.vim index 2ab79143..a70243ad 100644 --- a/indent/go.vim +++ b/indent/go.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/go.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/go.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/gohtmltmpl.vim b/indent/gohtmltmpl.vim index f389cf35..ca2ad060 100644 --- a/indent/gohtmltmpl.vim +++ b/indent/gohtmltmpl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/gohtmltmpl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/gohtmltmpl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/graphql.vim b/indent/graphql.vim index 6612527b..713381cb 100644 --- a/indent/graphql.vim +++ b/indent/graphql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/graphql.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/haml.vim b/indent/haml.vim index 3b00ccb2..8597f60d 100644 --- a/indent/haml.vim +++ b/indent/haml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/haml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/hamster.vim b/indent/hamster.vim index 0ec5252f..2edb2e73 100644 --- a/indent/hamster.vim +++ b/indent/hamster.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/hamster.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/handlebars.vim b/indent/handlebars.vim index 77780ef7..a2a9e4e3 100644 --- a/indent/handlebars.vim +++ b/indent/handlebars.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/handlebars.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/haskell.vim b/indent/haskell.vim index 5267f3f3..7f4d4a96 100644 --- a/indent/haskell.vim +++ b/indent/haskell.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/haskell.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/haskell.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/hcl.vim b/indent/hcl.vim index 7c054c83..e193b83b 100644 --- a/indent/hcl.vim +++ b/indent/hcl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/hcl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/hog.vim b/indent/hog.vim index 1fb5845e..3280d67d 100644 --- a/indent/hog.vim +++ b/indent/hog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/hog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/html.vim b/indent/html.vim index e3cac310..c8922278 100644 --- a/indent/html.vim +++ b/indent/html.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/html.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/htmldjango.vim b/indent/htmldjango.vim index 17654662..5e3b7fd1 100644 --- a/indent/htmldjango.vim +++ b/indent/htmldjango.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/htmldjango.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/idris.vim b/indent/idris.vim index 97e5386e..f3884f12 100644 --- a/indent/idris.vim +++ b/indent/idris.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/idris.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/idris2.vim b/indent/idris2.vim index 0870c3b8..f2ea6e31 100644 --- a/indent/idris2.vim +++ b/indent/idris2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/idris2.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/j.vim b/indent/j.vim index fdf4df81..dbea206c 100644 --- a/indent/j.vim +++ b/indent/j.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/j.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/java.vim b/indent/java.vim index 67bdec6f..06a20d7a 100644 --- a/indent/java.vim +++ b/indent/java.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/java.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/javascript.vim b/indent/javascript.vim index bb19347c..65acc8df 100644 --- a/indent/javascript.vim +++ b/indent/javascript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/javascript.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/javascript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/json.vim b/indent/json.vim index 62da1d7b..71b269e7 100644 --- a/indent/json.vim +++ b/indent/json.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/json.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/jsp.vim b/indent/jsp.vim index cb7dd66c..0cbfc2ee 100644 --- a/indent/jsp.vim +++ b/indent/jsp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/jsp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/jst.vim b/indent/jst.vim index 006bcf20..4920d6d7 100644 --- a/indent/jst.vim +++ b/indent/jst.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/jst.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/jst.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/julia.vim b/indent/julia.vim index 8b65d4a9..2db6faba 100644 --- a/indent/julia.vim +++ b/indent/julia.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/julia.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/kotlin.vim b/indent/kotlin.vim index fca5e30d..fdb8891c 100644 --- a/indent/kotlin.vim +++ b/indent/kotlin.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/kotlin.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/ld.vim b/indent/ld.vim index 6b153d3b..9d671e54 100644 --- a/indent/ld.vim +++ b/indent/ld.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/ld.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/ledger.vim b/indent/ledger.vim index 6cb48155..a79be9c1 100644 --- a/indent/ledger.vim +++ b/indent/ledger.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/ledger.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/ledger.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/less.vim b/indent/less.vim index 4c71822a..45276bea 100644 --- a/indent/less.vim +++ b/indent/less.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/less.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/lifelines.vim b/indent/lifelines.vim index f6c540f6..3da037d1 100644 --- a/indent/lifelines.vim +++ b/indent/lifelines.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/lifelines.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/lifelines.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/lilypond.vim b/indent/lilypond.vim index ec62de55..792ffbbf 100644 --- a/indent/lilypond.vim +++ b/indent/lilypond.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/lilypond.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/liquid.vim b/indent/liquid.vim index b922e162..5c0ba020 100644 --- a/indent/liquid.vim +++ b/indent/liquid.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/liquid.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/lisp.vim b/indent/lisp.vim index 466928dc..d920cf9e 100644 --- a/indent/lisp.vim +++ b/indent/lisp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/lisp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/litcoffee.vim b/indent/litcoffee.vim index b75f93ac..c7d3d29b 100644 --- a/indent/litcoffee.vim +++ b/indent/litcoffee.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/litcoffee.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/llvm.vim b/indent/llvm.vim index 34443080..d57b3a12 100644 --- a/indent/llvm.vim +++ b/indent/llvm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/llvm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/logtalk.vim b/indent/logtalk.vim index 437de863..843dcc23 100644 --- a/indent/logtalk.vim +++ b/indent/logtalk.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/logtalk.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/ls.vim b/indent/ls.vim index fe959f3e..41ebcac5 100644 --- a/indent/ls.vim +++ b/indent/ls.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/ls.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/lua.vim b/indent/lua.vim index e86c1b8d..f4bc40f0 100644 --- a/indent/lua.vim +++ b/indent/lua.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/lua.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/lua.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/mail.vim b/indent/mail.vim index ff3f67a9..462bd947 100644 --- a/indent/mail.vim +++ b/indent/mail.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/mail.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/make.vim b/indent/make.vim index 66553b2b..f7aabdc5 100644 --- a/indent/make.vim +++ b/indent/make.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/make.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/mako.vim b/indent/mako.vim index 12dc3f0d..27a09b05 100644 --- a/indent/mako.vim +++ b/indent/mako.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/mako.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/markdown.vim b/indent/markdown.vim index 927e5ed7..0e0ff248 100644 --- a/indent/markdown.vim +++ b/indent/markdown.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/markdown.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/meson.vim b/indent/meson.vim index 26dd22c3..6e055c7f 100644 --- a/indent/meson.vim +++ b/indent/meson.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/meson.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/mf.vim b/indent/mf.vim index 4bf6501e..a0158dd1 100644 --- a/indent/mf.vim +++ b/indent/mf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/mf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/moon.vim b/indent/moon.vim index 202d2de6..d5c55ec4 100644 --- a/indent/moon.vim +++ b/indent/moon.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/moon.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/mp.vim b/indent/mp.vim index d48e8ac4..45f15f64 100644 --- a/indent/mp.vim +++ b/indent/mp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/mp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/mustache.vim b/indent/mustache.vim index 05c58d36..f546461c 100644 --- a/indent/mustache.vim +++ b/indent/mustache.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/mustache.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/nginx.vim b/indent/nginx.vim index 1dd748d1..c797da45 100644 --- a/indent/nginx.vim +++ b/indent/nginx.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/nginx.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/nim.vim b/indent/nim.vim index c4cc7e98..9a3e62f3 100644 --- a/indent/nim.vim +++ b/indent/nim.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/nim.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/nim.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/nix.vim b/indent/nix.vim index 7b3f3def..15465a0e 100644 --- a/indent/nix.vim +++ b/indent/nix.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/nix.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/nsis.vim b/indent/nsis.vim index d6aef5c0..61b29b4a 100644 --- a/indent/nsis.vim +++ b/indent/nsis.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/nsis.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/ocaml.vim b/indent/ocaml.vim index 1d4e2f66..d7a89a61 100644 --- a/indent/ocaml.vim +++ b/indent/ocaml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/ocaml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/occam.vim b/indent/occam.vim index 06c9face..d6fefc76 100644 --- a/indent/occam.vim +++ b/indent/occam.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/occam.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/octave.vim b/indent/octave.vim index ce6c6952..f15e6745 100644 --- a/indent/octave.vim +++ b/indent/octave.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/octave.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/octave.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/odin.vim b/indent/odin.vim index 6cd93a9a..5c94c67d 100644 --- a/indent/odin.vim +++ b/indent/odin.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/odin.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/odin.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/omake.vim b/indent/omake.vim index b5cc828c..87ace177 100644 --- a/indent/omake.vim +++ b/indent/omake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/omake.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/opencl.vim b/indent/opencl.vim index 5c30574b..6914df5f 100644 --- a/indent/opencl.vim +++ b/indent/opencl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/opencl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/pascal.vim b/indent/pascal.vim index 92177246..f07cb0e4 100644 --- a/indent/pascal.vim +++ b/indent/pascal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/pascal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/perl.vim b/indent/perl.vim index d40e3629..4c671bc3 100644 --- a/indent/perl.vim +++ b/indent/perl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/perl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/pgsql.vim b/indent/pgsql.vim index a0ece225..ac967355 100644 --- a/indent/pgsql.vim +++ b/indent/pgsql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/pgsql.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/pgsql.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/plantuml.vim b/indent/plantuml.vim index 414ea989..c0f3065b 100644 --- a/indent/plantuml.vim +++ b/indent/plantuml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/plantuml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/pony.vim b/indent/pony.vim index 32a4c107..51f668de 100644 --- a/indent/pony.vim +++ b/indent/pony.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/pony.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/postscr.vim b/indent/postscr.vim index 1f8e563c..89797648 100644 --- a/indent/postscr.vim +++ b/indent/postscr.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/postscr.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/pov.vim b/indent/pov.vim index 747a2135..1964b7b8 100644 --- a/indent/pov.vim +++ b/indent/pov.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/pov.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/pov.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/prolog.vim b/indent/prolog.vim index e4eb14dc..cb97bf86 100644 --- a/indent/prolog.vim +++ b/indent/prolog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/prolog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/proto.vim b/indent/proto.vim index d932d146..8bf58362 100644 --- a/indent/proto.vim +++ b/indent/proto.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/proto.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/proto.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/ps1.vim b/indent/ps1.vim index da13602a..92222de8 100644 --- a/indent/ps1.vim +++ b/indent/ps1.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/ps1.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/pug.vim b/indent/pug.vim index 175abe39..d0aadb62 100644 --- a/indent/pug.vim +++ b/indent/pug.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/pug.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/puppet.vim b/indent/puppet.vim index 8a536690..321bf9f8 100644 --- a/indent/puppet.vim +++ b/indent/puppet.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/puppet.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/purescript.vim b/indent/purescript.vim index fb83604d..fc6e2a26 100644 --- a/indent/purescript.vim +++ b/indent/purescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/purescript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/pyrex.vim b/indent/pyrex.vim index 9440efeb..061b71a8 100644 --- a/indent/pyrex.vim +++ b/indent/pyrex.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/pyrex.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/python.vim b/indent/python.vim index 8128d26c..8e2ea0d7 100644 --- a/indent/python.vim +++ b/indent/python.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/python.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/python.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/qml.vim b/indent/qml.vim index 5d02a475..944e72f2 100644 --- a/indent/qml.vim +++ b/indent/qml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/qml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/racket.vim b/indent/racket.vim index 966bb8ce..626dde52 100644 --- a/indent/racket.vim +++ b/indent/racket.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/racket.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/raku.vim b/indent/raku.vim index ef3976af..052693cf 100644 --- a/indent/raku.vim +++ b/indent/raku.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/raku.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/razor.vim b/indent/razor.vim index 8465fb7f..e35688e4 100644 --- a/indent/razor.vim +++ b/indent/razor.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/razor.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/readline.vim b/indent/readline.vim index 9aa70349..53ef6f21 100644 --- a/indent/readline.vim +++ b/indent/readline.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/readline.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/reason.vim b/indent/reason.vim index 11a6c4e0..490cdeaf 100644 --- a/indent/reason.vim +++ b/indent/reason.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/reason.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/reason.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/rmd.vim b/indent/rmd.vim index e52686b4..d95e442a 100644 --- a/indent/rmd.vim +++ b/indent/rmd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/rmd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/rnoweb.vim b/indent/rnoweb.vim index 54e7dab2..4473d32d 100644 --- a/indent/rnoweb.vim +++ b/indent/rnoweb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/rnoweb.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/rpl.vim b/indent/rpl.vim index bc674b4d..f5df9afb 100644 --- a/indent/rpl.vim +++ b/indent/rpl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/rpl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/rrst.vim b/indent/rrst.vim index 32fd82d3..5b3187b6 100644 --- a/indent/rrst.vim +++ b/indent/rrst.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/rrst.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/rst.vim b/indent/rst.vim index 82e6a812..2585df03 100644 --- a/indent/rst.vim +++ b/indent/rst.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/rst.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/ruby.vim b/indent/ruby.vim index 37363d9f..56a348a7 100644 --- a/indent/ruby.vim +++ b/indent/ruby.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/ruby.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/rust.vim b/indent/rust.vim index 69fdb078..7f0fff27 100644 --- a/indent/rust.vim +++ b/indent/rust.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/rust.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/sas.vim b/indent/sas.vim index 4eac68cb..671e213c 100644 --- a/indent/sas.vim +++ b/indent/sas.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/sas.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/sas.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/sass.vim b/indent/sass.vim index d59a1aba..b3002bef 100644 --- a/indent/sass.vim +++ b/indent/sass.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/sass.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/scala.vim b/indent/scala.vim index f29f80b8..62d67720 100644 --- a/indent/scala.vim +++ b/indent/scala.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/scala.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/scheme.vim b/indent/scheme.vim index 1524ce88..2e0c747b 100644 --- a/indent/scheme.vim +++ b/indent/scheme.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/scheme.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/scss.vim b/indent/scss.vim index c955aeb9..8d302d30 100644 --- a/indent/scss.vim +++ b/indent/scss.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/scss.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/sdl.vim b/indent/sdl.vim index eb6b783f..3083b048 100644 --- a/indent/sdl.vim +++ b/indent/sdl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/sdl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/sdl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/slim.vim b/indent/slim.vim index 5c10c83c..742834e0 100644 --- a/indent/slim.vim +++ b/indent/slim.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/slim.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/slime.vim b/indent/slime.vim index 366ad4e0..77b902a2 100644 --- a/indent/slime.vim +++ b/indent/slime.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/slime.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/slime.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/sml.vim b/indent/sml.vim index b1d15bc1..f36bac6c 100644 --- a/indent/sml.vim +++ b/indent/sml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/sml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/sml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/solidity.vim b/indent/solidity.vim index a3c9b45d..638a3239 100644 --- a/indent/solidity.vim +++ b/indent/solidity.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/solidity.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/sql.vim b/indent/sql.vim index 49b2a638..82667f5a 100644 --- a/indent/sql.vim +++ b/indent/sql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/sql.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/sshconfig.vim b/indent/sshconfig.vim index a0d7f7d2..aedb0218 100644 --- a/indent/sshconfig.vim +++ b/indent/sshconfig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/sshconfig.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/stylus.vim b/indent/stylus.vim index 584f4de5..c89dafb3 100644 --- a/indent/stylus.vim +++ b/indent/stylus.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/stylus.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/svelte.vim b/indent/svelte.vim index 00e65db6..599023a0 100644 --- a/indent/svelte.vim +++ b/indent/svelte.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/svelte.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/svg.vim b/indent/svg.vim index 5bf84360..2057c3ef 100644 --- a/indent/svg.vim +++ b/indent/svg.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/svg.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/svg.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/swift.vim b/indent/swift.vim index dc09cc5d..48efb354 100644 --- a/indent/swift.vim +++ b/indent/swift.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/swift.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/systemverilog.vim b/indent/systemverilog.vim index 015a60dd..a5c423b2 100644 --- a/indent/systemverilog.vim +++ b/indent/systemverilog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/systemverilog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/tcl.vim b/indent/tcl.vim index be81acbd..0eedaa29 100644 --- a/indent/tcl.vim +++ b/indent/tcl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/tcl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/teraterm.vim b/indent/teraterm.vim index c55127b6..c0e6d131 100644 --- a/indent/teraterm.vim +++ b/indent/teraterm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/teraterm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/teraterm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/terraform.vim b/indent/terraform.vim index d0358e3d..9639d47c 100644 --- a/indent/terraform.vim +++ b/indent/terraform.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/terraform.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/tex.vim b/indent/tex.vim index 71aea3f3..4da631a2 100644 --- a/indent/tex.vim +++ b/indent/tex.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/tex.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/tf.vim b/indent/tf.vim index 0f388869..096b1977 100644 --- a/indent/tf.vim +++ b/indent/tf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/tf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/tf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/tilde.vim b/indent/tilde.vim index 30551dd3..b412a64b 100644 --- a/indent/tilde.vim +++ b/indent/tilde.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/tilde.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/tilde.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/treetop.vim b/indent/treetop.vim index 1c565846..01b80d68 100644 --- a/indent/treetop.vim +++ b/indent/treetop.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/treetop.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/twig.vim b/indent/twig.vim index 0f52b6b0..d9472ea4 100644 --- a/indent/twig.vim +++ b/indent/twig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/twig.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/typescript.vim b/indent/typescript.vim index 53f716d2..a9577906 100644 --- a/indent/typescript.vim +++ b/indent/typescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/typescript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/typescriptreact.vim b/indent/typescriptreact.vim index 52bb0eda..a89ae88d 100644 --- a/indent/typescriptreact.vim +++ b/indent/typescriptreact.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/typescriptreact.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/vala.vim b/indent/vala.vim index ecf4cc29..cbcfbf2c 100644 --- a/indent/vala.vim +++ b/indent/vala.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/vala.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/vb.vim b/indent/vb.vim index d4eaa2ec..5e37b74e 100644 --- a/indent/vb.vim +++ b/indent/vb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/vb.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/velocity.vim b/indent/velocity.vim index 43015f06..ba1344bf 100644 --- a/indent/velocity.vim +++ b/indent/velocity.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/velocity.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/velocity.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/verilog.vim b/indent/verilog.vim index 9e6fcddc..02ed70a2 100644 --- a/indent/verilog.vim +++ b/indent/verilog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/verilog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/vhdl.vim b/indent/vhdl.vim index 55e8974a..c129a763 100644 --- a/indent/vhdl.vim +++ b/indent/vhdl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/vhdl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/vlang.vim b/indent/vlang.vim index bfff3d37..c5b9660a 100644 --- a/indent/vlang.vim +++ b/indent/vlang.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/vlang.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/vroom.vim b/indent/vroom.vim index 40ee746b..832019d3 100644 --- a/indent/vroom.vim +++ b/indent/vroom.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/vroom.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/vue.vim b/indent/vue.vim index 41b8051b..e53a528b 100644 --- a/indent/vue.vim +++ b/indent/vue.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/vue.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/wast.vim b/indent/wast.vim index 870874c6..52cb7ab6 100644 --- a/indent/wast.vim +++ b/indent/wast.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/wast.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/xf86conf.vim b/indent/xf86conf.vim index 7d1ccbe4..7932c428 100644 --- a/indent/xf86conf.vim +++ b/indent/xf86conf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/xf86conf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/xhtml.vim b/indent/xhtml.vim index 2f95f592..7134ac81 100644 --- a/indent/xhtml.vim +++ b/indent/xhtml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/xhtml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/xinetd.vim b/indent/xinetd.vim index 2056eb50..e2898b2d 100644 --- a/indent/xinetd.vim +++ b/indent/xinetd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/xinetd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/xsd.vim b/indent/xsd.vim index bb0051f1..685f44e1 100644 --- a/indent/xsd.vim +++ b/indent/xsd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/xsd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/xslt.vim b/indent/xslt.vim index f8660431..d111bfba 100644 --- a/indent/xslt.vim +++ b/indent/xslt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/xslt.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/yacc.vim b/indent/yacc.vim index c42be8bd..c4b16402 100644 --- a/indent/yacc.vim +++ b/indent/yacc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/yacc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'indent/yacc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/yaml.vim b/indent/yaml.vim index 7bb1c7da..3fb7dcc9 100644 --- a/indent/yaml.vim +++ b/indent/yaml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/yaml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/zig.vim b/indent/zig.vim index 3ce6b88c..3f9d590f 100644 --- a/indent/zig.vim +++ b/indent/zig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/zig.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/indent/zimbu.vim b/indent/zimbu.vim index 593a6557..987b4727 100644 --- a/indent/zimbu.vim +++ b/indent/zimbu.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'indent/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, 'indent/zimbu.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/scripts/build b/scripts/build index 7d678e43..86237647 100755 --- a/scripts/build +++ b/scripts/build @@ -295,7 +295,9 @@ def copy_file(name, src, dest) open(dest, "w") do |output| if dest.match?(/\.vim$/) && !dest.match('after/') output << <<~EOF - let files = filter(globpath(&rtp, '#{dest}', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) + let s:base = expand("<sfile>:h:h") + let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } + let files = filter(globpath(&rtp, '#{dest}', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/8th.vim b/syntax/8th.vim index 77b0db4d..64672696 100644 --- a/syntax/8th.vim +++ b/syntax/8th.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/8th.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/Jenkinsfile.vim b/syntax/Jenkinsfile.vim index 6db426f3..fbaa6133 100644 --- a/syntax/Jenkinsfile.vim +++ b/syntax/Jenkinsfile.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/Jenkinsfile.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/Jenkinsfile.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/a2ps.vim b/syntax/a2ps.vim index 1e19b543..3616993d 100644 --- a/syntax/a2ps.vim +++ b/syntax/a2ps.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/a2ps.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/a65.vim b/syntax/a65.vim index 49ebfa54..0e85dfb9 100644 --- a/syntax/a65.vim +++ b/syntax/a65.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/a65.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/a65.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/aap.vim b/syntax/aap.vim index 3bfbdf0e..c8a3183a 100644 --- a/syntax/aap.vim +++ b/syntax/aap.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/aap.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/abap.vim b/syntax/abap.vim index f813d783..49a06670 100644 --- a/syntax/abap.vim +++ b/syntax/abap.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/abap.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/abaqus.vim b/syntax/abaqus.vim index 27617bca..2ade8afb 100644 --- a/syntax/abaqus.vim +++ b/syntax/abaqus.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/abaqus.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/abc.vim b/syntax/abc.vim index 69e06240..7bb3ddd0 100644 --- a/syntax/abc.vim +++ b/syntax/abc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/abc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/abc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/abel.vim b/syntax/abel.vim index be84cb0d..a2bc783c 100644 --- a/syntax/abel.vim +++ b/syntax/abel.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/abel.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/abel.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/acedb.vim b/syntax/acedb.vim index 26de8945..2f738269 100644 --- a/syntax/acedb.vim +++ b/syntax/acedb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/acedb.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/acedb.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ada.vim b/syntax/ada.vim index aeea3449..20e5d03c 100644 --- a/syntax/ada.vim +++ b/syntax/ada.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ada.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ahdl.vim b/syntax/ahdl.vim index 825e7df3..decba269 100644 --- a/syntax/ahdl.vim +++ b/syntax/ahdl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ahdl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ahdl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/aidl.vim b/syntax/aidl.vim index 530e1626..b40c09fe 100644 --- a/syntax/aidl.vim +++ b/syntax/aidl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/aidl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/aidl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/alsaconf.vim b/syntax/alsaconf.vim index 6331bbce..9c922ae3 100644 --- a/syntax/alsaconf.vim +++ b/syntax/alsaconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/alsaconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/aml.vim b/syntax/aml.vim index c5ed3a57..03bb4726 100644 --- a/syntax/aml.vim +++ b/syntax/aml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/aml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/aml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ampl.vim b/syntax/ampl.vim index 57b76abc..c660def8 100644 --- a/syntax/ampl.vim +++ b/syntax/ampl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ampl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ampl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ansible.vim b/syntax/ansible.vim index 7bbf5157..2fd53e7f 100644 --- a/syntax/ansible.vim +++ b/syntax/ansible.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ansible.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ansible_hosts.vim b/syntax/ansible_hosts.vim index cb5f68c6..437de336 100644 --- a/syntax/ansible_hosts.vim +++ b/syntax/ansible_hosts.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ansible_hosts.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ant.vim b/syntax/ant.vim index ea81e2f5..417ddcfe 100644 --- a/syntax/ant.vim +++ b/syntax/ant.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ant.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/apache.vim b/syntax/apache.vim index b1858263..6df4cd92 100644 --- a/syntax/apache.vim +++ b/syntax/apache.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/apache.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/apache.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/apachestyle.vim b/syntax/apachestyle.vim index 57f40134..27c904ec 100644 --- a/syntax/apachestyle.vim +++ b/syntax/apachestyle.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/apachestyle.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/apachestyle.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/apiblueprint.vim b/syntax/apiblueprint.vim index 76c03611..7694fc1b 100644 --- a/syntax/apiblueprint.vim +++ b/syntax/apiblueprint.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/apiblueprint.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/apiblueprint.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/applescript.vim b/syntax/applescript.vim index 8da47afb..298c8c06 100644 --- a/syntax/applescript.vim +++ b/syntax/applescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/applescript.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/applescript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/aptconf.vim b/syntax/aptconf.vim index 4d7b252f..9ff3cbee 100644 --- a/syntax/aptconf.vim +++ b/syntax/aptconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/aptconf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/aptconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/arch.vim b/syntax/arch.vim index 3f9b913a..5f553c56 100644 --- a/syntax/arch.vim +++ b/syntax/arch.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/arch.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/arduino.vim b/syntax/arduino.vim index 8d29bf1e..508dc205 100644 --- a/syntax/arduino.vim +++ b/syntax/arduino.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/arduino.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/arduino.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/art.vim b/syntax/art.vim index 73e10e63..21adc885 100644 --- a/syntax/art.vim +++ b/syntax/art.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/art.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/asciidoc.vim b/syntax/asciidoc.vim index afbc905f..f82310b1 100644 --- a/syntax/asciidoc.vim +++ b/syntax/asciidoc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/asciidoc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/asciidoc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/asl.vim b/syntax/asl.vim index bc8a0950..57a138c7 100644 --- a/syntax/asl.vim +++ b/syntax/asl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/asl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/asl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/asn.vim b/syntax/asn.vim index d355ce43..334ef9d6 100644 --- a/syntax/asn.vim +++ b/syntax/asn.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/asn.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/asn.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/aspperl.vim b/syntax/aspperl.vim index 4a2c553d..1292a864 100644 --- a/syntax/aspperl.vim +++ b/syntax/aspperl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/aspperl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/aspperl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/aspvbs.vim b/syntax/aspvbs.vim index b008f672..cbabc644 100644 --- a/syntax/aspvbs.vim +++ b/syntax/aspvbs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/aspvbs.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/asterisk.vim b/syntax/asterisk.vim index 7318d847..672515f3 100644 --- a/syntax/asterisk.vim +++ b/syntax/asterisk.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/asterisk.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/asterisk.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/asteriskvm.vim b/syntax/asteriskvm.vim index df563e2d..9b8ffbc1 100644 --- a/syntax/asteriskvm.vim +++ b/syntax/asteriskvm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/asteriskvm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/asteriskvm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/atlas.vim b/syntax/atlas.vim index 4341c201..39ee5b90 100644 --- a/syntax/atlas.vim +++ b/syntax/atlas.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/atlas.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/atlas.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/autodoc.vim b/syntax/autodoc.vim index c3ec62eb..5091322d 100644 --- a/syntax/autodoc.vim +++ b/syntax/autodoc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/autodoc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/autodoc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/autoit.vim b/syntax/autoit.vim index 43920246..61faf132 100644 --- a/syntax/autoit.vim +++ b/syntax/autoit.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/autoit.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/autoit.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/automake.vim b/syntax/automake.vim index 86cc7578..8012a051 100644 --- a/syntax/automake.vim +++ b/syntax/automake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/automake.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ave.vim b/syntax/ave.vim index 340e3a5e..80c7e9c6 100644 --- a/syntax/ave.vim +++ b/syntax/ave.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ave.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ave.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/awk.vim b/syntax/awk.vim index ae4c92ea..c4648b2d 100644 --- a/syntax/awk.vim +++ b/syntax/awk.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/awk.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/b.vim b/syntax/b.vim index c05ab6b2..b5eedb24 100644 --- a/syntax/b.vim +++ b/syntax/b.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/b.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/b.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic.vim b/syntax/basic.vim index 24a8b097..d444372c 100644 --- a/syntax/basic.vim +++ b/syntax/basic.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/class.vim b/syntax/basic/class.vim index dea703aa..4fc03dcf 100644 --- a/syntax/basic/class.vim +++ b/syntax/basic/class.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/class.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/class.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/cluster.vim b/syntax/basic/cluster.vim index f5eb59d1..017c4ba9 100644 --- a/syntax/basic/cluster.vim +++ b/syntax/basic/cluster.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/cluster.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/cluster.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/decorator.vim b/syntax/basic/decorator.vim index 7f5456cd..fc4b7e4d 100644 --- a/syntax/basic/decorator.vim +++ b/syntax/basic/decorator.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/decorator.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/decorator.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/doc.vim b/syntax/basic/doc.vim index 2bf5d614..81af2a9a 100644 --- a/syntax/basic/doc.vim +++ b/syntax/basic/doc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/doc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/doc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/function.vim b/syntax/basic/function.vim index ac94b9a1..c4ffef90 100644 --- a/syntax/basic/function.vim +++ b/syntax/basic/function.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/function.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/function.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/identifiers.vim b/syntax/basic/identifiers.vim index b03df011..ce733f3e 100644 --- a/syntax/basic/identifiers.vim +++ b/syntax/basic/identifiers.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/identifiers.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/identifiers.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/keyword.vim b/syntax/basic/keyword.vim index ddb4e8a1..45e45768 100644 --- a/syntax/basic/keyword.vim +++ b/syntax/basic/keyword.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/keyword.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/keyword.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/literal.vim b/syntax/basic/literal.vim index 6f092fcc..8458dcc6 100644 --- a/syntax/basic/literal.vim +++ b/syntax/basic/literal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/literal.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/literal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/members.vim b/syntax/basic/members.vim index 7362eaf9..65366dac 100644 --- a/syntax/basic/members.vim +++ b/syntax/basic/members.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/members.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/members.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/object.vim b/syntax/basic/object.vim index 6f5d1f28..869cf063 100644 --- a/syntax/basic/object.vim +++ b/syntax/basic/object.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/object.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/object.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/patch.vim b/syntax/basic/patch.vim index a2ebd1da..9d97817c 100644 --- a/syntax/basic/patch.vim +++ b/syntax/basic/patch.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/patch.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/patch.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/reserved.vim b/syntax/basic/reserved.vim index 0cfb36ac..3ba5c8ec 100644 --- a/syntax/basic/reserved.vim +++ b/syntax/basic/reserved.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/reserved.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/reserved.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/symbols.vim b/syntax/basic/symbols.vim index 15490f80..bc8db0dc 100644 --- a/syntax/basic/symbols.vim +++ b/syntax/basic/symbols.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/symbols.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/symbols.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/basic/type.vim b/syntax/basic/type.vim index 378ecafe..9785545d 100644 --- a/syntax/basic/type.vim +++ b/syntax/basic/type.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/basic/type.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/basic/type.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/bc.vim b/syntax/bc.vim index 35533f84..8e14e85f 100644 --- a/syntax/bc.vim +++ b/syntax/bc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/bc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/bc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/bdf.vim b/syntax/bdf.vim index 548ef1b3..8cd0d16e 100644 --- a/syntax/bdf.vim +++ b/syntax/bdf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/bdf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/bib.vim b/syntax/bib.vim index f59ab6ec..6f24e016 100644 --- a/syntax/bib.vim +++ b/syntax/bib.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/bib.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/bib.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/bindzone.vim b/syntax/bindzone.vim index d59c993d..f66cd0f9 100644 --- a/syntax/bindzone.vim +++ b/syntax/bindzone.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/bindzone.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/bindzone.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/blade.vim b/syntax/blade.vim index da81031d..582df259 100644 --- a/syntax/blade.vim +++ b/syntax/blade.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/blade.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/blank.vim b/syntax/blank.vim index d5a80aa2..e686351c 100644 --- a/syntax/blank.vim +++ b/syntax/blank.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/blank.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/blank.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/brewfile.vim b/syntax/brewfile.vim index 1f52c49b..383c1810 100644 --- a/syntax/brewfile.vim +++ b/syntax/brewfile.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/brewfile.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/brewfile.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/bsdl.vim b/syntax/bsdl.vim index d23bfb28..2d6b8475 100644 --- a/syntax/bsdl.vim +++ b/syntax/bsdl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/bsdl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/bsdl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/bst.vim b/syntax/bst.vim index 87688f0c..3e7c815d 100644 --- a/syntax/bst.vim +++ b/syntax/bst.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/bst.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/bzl.vim b/syntax/bzl.vim index aed4d6bb..f5080a81 100644 --- a/syntax/bzl.vim +++ b/syntax/bzl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/bzl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/bzr.vim b/syntax/bzr.vim index c641d25d..10cefb1e 100644 --- a/syntax/bzr.vim +++ b/syntax/bzr.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/bzr.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/bzr.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/c.vim b/syntax/c.vim index 930bf561..63c3494f 100644 --- a/syntax/c.vim +++ b/syntax/c.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/c.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/c.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cabal-1.vim b/syntax/cabal-1.vim index 13618fbc..45fa2bdf 100644 --- a/syntax/cabal-1.vim +++ b/syntax/cabal-1.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cabal.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cabal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cabal-2.vim b/syntax/cabal-2.vim index 8f502ea0..8b9f1431 100644 --- a/syntax/cabal-2.vim +++ b/syntax/cabal-2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cabal-2.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cabal-2.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/caddyfile.vim b/syntax/caddyfile.vim index 59ee547c..3b693065 100644 --- a/syntax/caddyfile.vim +++ b/syntax/caddyfile.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/caddyfile.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/calendar.vim b/syntax/calendar.vim index 218b5db9..0e6e5847 100644 --- a/syntax/calendar.vim +++ b/syntax/calendar.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/calendar.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/carp.vim b/syntax/carp.vim index 16976286..5c99680d 100644 --- a/syntax/carp.vim +++ b/syntax/carp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/carp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/carp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/catalog.vim b/syntax/catalog.vim index 1949e134..7fff5fda 100644 --- a/syntax/catalog.vim +++ b/syntax/catalog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/catalog.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/catalog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cdl.vim b/syntax/cdl.vim index d54fd30e..409c1dc7 100644 --- a/syntax/cdl.vim +++ b/syntax/cdl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cdl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cdl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cdrdaoconf.vim b/syntax/cdrdaoconf.vim index 41285ff5..b6f8b053 100644 --- a/syntax/cdrdaoconf.vim +++ b/syntax/cdrdaoconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/cdrdaoconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cdrtoc.vim b/syntax/cdrtoc.vim index 3392635c..9cf118b4 100644 --- a/syntax/cdrtoc.vim +++ b/syntax/cdrtoc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cdrtoc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cdrtoc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cf.vim b/syntax/cf.vim index 21d3f5a9..52b17987 100644 --- a/syntax/cf.vim +++ b/syntax/cf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cfg.vim b/syntax/cfg.vim index a70a77f5..550203e7 100644 --- a/syntax/cfg.vim +++ b/syntax/cfg.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/cfg.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ch.vim b/syntax/ch.vim index 0a6ee7c6..fd97c7ce 100644 --- a/syntax/ch.vim +++ b/syntax/ch.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ch.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/chaiscript.vim b/syntax/chaiscript.vim index 25653ce0..609d35ff 100644 --- a/syntax/chaiscript.vim +++ b/syntax/chaiscript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/chaiscript.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/chaiscript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/chaskell.vim b/syntax/chaskell.vim index 019a2d6b..4ec9a93e 100644 --- a/syntax/chaskell.vim +++ b/syntax/chaskell.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/chaskell.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/chaskell.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/chill.vim b/syntax/chill.vim index 5ff41bea..18a706c6 100644 --- a/syntax/chill.vim +++ b/syntax/chill.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/chill.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/chill.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/chordpro.vim b/syntax/chordpro.vim index 25dad67f..0ac02291 100644 --- a/syntax/chordpro.vim +++ b/syntax/chordpro.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/chordpro.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/chordpro.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cl.vim b/syntax/cl.vim index fe377a64..6e5d0420 100644 --- a/syntax/cl.vim +++ b/syntax/cl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/clean.vim b/syntax/clean.vim index fc601012..91df7e01 100644 --- a/syntax/clean.vim +++ b/syntax/clean.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/clean.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/clean.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/clojure.vim b/syntax/clojure.vim index e4a21ac5..be228596 100644 --- a/syntax/clojure.vim +++ b/syntax/clojure.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/clojure.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cmake.vim b/syntax/cmake.vim index 0ea44d78..cae10e0d 100644 --- a/syntax/cmake.vim +++ b/syntax/cmake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cmake.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cmake.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cmod.vim b/syntax/cmod.vim index 7d5fc740..41058a32 100644 --- a/syntax/cmod.vim +++ b/syntax/cmod.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cmod.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cmod.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cmusrc.vim b/syntax/cmusrc.vim index 9325e550..8d9ff598 100644 --- a/syntax/cmusrc.vim +++ b/syntax/cmusrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cmusrc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cmusrc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cobol.vim b/syntax/cobol.vim index 2d238c83..4f324728 100644 --- a/syntax/cobol.vim +++ b/syntax/cobol.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/cobol.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/coco.vim b/syntax/coco.vim index 5d914213..bd8ff87d 100644 --- a/syntax/coco.vim +++ b/syntax/coco.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/coco.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/coco.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/coffee.vim b/syntax/coffee.vim index 043a907e..893d85cc 100644 --- a/syntax/coffee.vim +++ b/syntax/coffee.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/coffee.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/common.vim b/syntax/common.vim index 839254a6..d7785ba6 100644 --- a/syntax/common.vim +++ b/syntax/common.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/common.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/common.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/conaryrecipe.vim b/syntax/conaryrecipe.vim index f054be03..c1e37f2c 100644 --- a/syntax/conaryrecipe.vim +++ b/syntax/conaryrecipe.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/conaryrecipe.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/conaryrecipe.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/conf.vim b/syntax/conf.vim index 9d64dc7e..a8c4b050 100644 --- a/syntax/conf.vim +++ b/syntax/conf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/conf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/config.vim b/syntax/config.vim index d89e93c7..ea1d63ac 100644 --- a/syntax/config.vim +++ b/syntax/config.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/config.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cpp.vim b/syntax/cpp.vim index 26d1975f..0e51f1dd 100644 --- a/syntax/cpp.vim +++ b/syntax/cpp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cpp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cpp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cql.vim b/syntax/cql.vim index f07f817d..e575d2fc 100644 --- a/syntax/cql.vim +++ b/syntax/cql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cql.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cql.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/crm.vim b/syntax/crm.vim index bfe5165a..a110facb 100644 --- a/syntax/crm.vim +++ b/syntax/crm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/crm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/crontab.vim b/syntax/crontab.vim index c858dab4..12cebc77 100644 --- a/syntax/crontab.vim +++ b/syntax/crontab.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/crontab.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/crontab.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cryptol.vim b/syntax/cryptol.vim index c0256e54..6f098e8c 100644 --- a/syntax/cryptol.vim +++ b/syntax/cryptol.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cryptol.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cryptol.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/crystal.vim b/syntax/crystal.vim index 0866b383..4b322893 100644 --- a/syntax/crystal.vim +++ b/syntax/crystal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/crystal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cs.vim b/syntax/cs.vim index 687c66c2..f9a8a6ae 100644 --- a/syntax/cs.vim +++ b/syntax/cs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/cs.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/csc.vim b/syntax/csc.vim index 5ee5668a..b9423727 100644 --- a/syntax/csc.vim +++ b/syntax/csc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/csc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/csdl.vim b/syntax/csdl.vim index fe6c088f..dd934766 100644 --- a/syntax/csdl.vim +++ b/syntax/csdl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/csdl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/csdl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/csp.vim b/syntax/csp.vim index 4a3b862e..70be4d47 100644 --- a/syntax/csp.vim +++ b/syntax/csp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/csp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/csp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/css.vim b/syntax/css.vim index 2cf2645a..3ef88695 100644 --- a/syntax/css.vim +++ b/syntax/css.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/css.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/csv.vim b/syntax/csv.vim index 574ac3de..a0dbfd96 100644 --- a/syntax/csv.vim +++ b/syntax/csv.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/csv.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cterm.vim b/syntax/cterm.vim index 85260cf2..f037590d 100644 --- a/syntax/cterm.vim +++ b/syntax/cterm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cterm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cterm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cucumber.vim b/syntax/cucumber.vim index 77123633..521332e2 100644 --- a/syntax/cucumber.vim +++ b/syntax/cucumber.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/cucumber.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cuda.vim b/syntax/cuda.vim index 73e7c0df..a65302b3 100644 --- a/syntax/cuda.vim +++ b/syntax/cuda.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cuda.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cuda.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cuesheet.vim b/syntax/cuesheet.vim index f60af612..9e5df7ce 100644 --- a/syntax/cuesheet.vim +++ b/syntax/cuesheet.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cuesheet.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cuesheet.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cupl.vim b/syntax/cupl.vim index 81807257..98655e3c 100644 --- a/syntax/cupl.vim +++ b/syntax/cupl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cupl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cupl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cuplsim.vim b/syntax/cuplsim.vim index 9f0ff45c..304b311c 100644 --- a/syntax/cuplsim.vim +++ b/syntax/cuplsim.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cuplsim.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cuplsim.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cvs.vim b/syntax/cvs.vim index 3b3011da..b7a0fbf2 100644 --- a/syntax/cvs.vim +++ b/syntax/cvs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cvs.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cvs.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cvsrc.vim b/syntax/cvsrc.vim index 999baf5a..4856394e 100644 --- a/syntax/cvsrc.vim +++ b/syntax/cvsrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/cvsrc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/cynpp.vim b/syntax/cynpp.vim index 5e870ae7..f2e4da9c 100644 --- a/syntax/cynpp.vim +++ b/syntax/cynpp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/cynpp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/cynpp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/d.vim b/syntax/d.vim index 5f3f051b..2e3de64a 100644 --- a/syntax/d.vim +++ b/syntax/d.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/d.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/d.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dart.vim b/syntax/dart.vim index 5b0c1a98..a2a1f8cf 100644 --- a/syntax/dart.vim +++ b/syntax/dart.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/dart.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/datascript.vim b/syntax/datascript.vim index 79a74867..68738394 100644 --- a/syntax/datascript.vim +++ b/syntax/datascript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/datascript.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/datascript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dcd.vim b/syntax/dcd.vim index 17ffa851..fd8cec39 100644 --- a/syntax/dcd.vim +++ b/syntax/dcd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/dcd.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/dcd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dcov.vim b/syntax/dcov.vim index 007a7b48..1949e754 100644 --- a/syntax/dcov.vim +++ b/syntax/dcov.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/dcov.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/dcov.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dd.vim b/syntax/dd.vim index c634232a..9300e0d4 100644 --- a/syntax/dd.vim +++ b/syntax/dd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/dd.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/dd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ddoc.vim b/syntax/ddoc.vim index 5bca7082..189e5394 100644 --- a/syntax/ddoc.vim +++ b/syntax/ddoc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ddoc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ddoc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/debchangelog.vim b/syntax/debchangelog.vim index e7040ab3..c22c95ab 100644 --- a/syntax/debchangelog.vim +++ b/syntax/debchangelog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/debchangelog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/debcontrol.vim b/syntax/debcontrol.vim index 0c246e56..6c8758e4 100644 --- a/syntax/debcontrol.vim +++ b/syntax/debcontrol.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/debcontrol.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/debcopyright.vim b/syntax/debcopyright.vim index aded0dda..1bdcd5ff 100644 --- a/syntax/debcopyright.vim +++ b/syntax/debcopyright.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/debcopyright.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/debcopyright.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/debsources.vim b/syntax/debsources.vim index daa308d4..3fce617b 100644 --- a/syntax/debsources.vim +++ b/syntax/debsources.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/debsources.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/debsources.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/def.vim b/syntax/def.vim index 08455938..f8535e5d 100644 --- a/syntax/def.vim +++ b/syntax/def.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/def.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/def.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/denyhosts.vim b/syntax/denyhosts.vim index 7a716af8..8be39694 100644 --- a/syntax/denyhosts.vim +++ b/syntax/denyhosts.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/denyhosts.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/desc.vim b/syntax/desc.vim index 413fd67b..943f87af 100644 --- a/syntax/desc.vim +++ b/syntax/desc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/desc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/desc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/desktop.vim b/syntax/desktop.vim index 015f2f17..9e149339 100644 --- a/syntax/desktop.vim +++ b/syntax/desktop.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/desktop.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/desktop.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dhall.vim b/syntax/dhall.vim index a52161bb..4c27d0fe 100644 --- a/syntax/dhall.vim +++ b/syntax/dhall.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/dhall.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dictconf.vim b/syntax/dictconf.vim index e72bf0df..c515cf56 100644 --- a/syntax/dictconf.vim +++ b/syntax/dictconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/dictconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dictdconf.vim b/syntax/dictdconf.vim index 85383c63..c30a900c 100644 --- a/syntax/dictdconf.vim +++ b/syntax/dictdconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/dictdconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/diff.vim b/syntax/diff.vim index e9757b78..08b1f7dc 100644 --- a/syntax/diff.vim +++ b/syntax/diff.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/diff.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dircolors.vim b/syntax/dircolors.vim index dfd085a8..53297837 100644 --- a/syntax/dircolors.vim +++ b/syntax/dircolors.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/dircolors.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/django.vim b/syntax/django.vim index 51a6a3e7..dfe54082 100644 --- a/syntax/django.vim +++ b/syntax/django.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/django.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/django.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dnsmasq.vim b/syntax/dnsmasq.vim index b9f6b593..5373fea7 100644 --- a/syntax/dnsmasq.vim +++ b/syntax/dnsmasq.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/dnsmasq.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/dnsmasq.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/docker-compose.vim b/syntax/docker-compose.vim index be0e07ef..71648bbb 100644 --- a/syntax/docker-compose.vim +++ b/syntax/docker-compose.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/docker-compose.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dockerfile.vim b/syntax/dockerfile.vim index 2480c7fc..5bd4c9f9 100644 --- a/syntax/dockerfile.vim +++ b/syntax/dockerfile.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/dockerfile.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dosbatch.vim b/syntax/dosbatch.vim index a9b93ceb..ee42764d 100644 --- a/syntax/dosbatch.vim +++ b/syntax/dosbatch.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/dosbatch.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dosini.vim b/syntax/dosini.vim index c052ba7c..48933236 100644 --- a/syntax/dosini.vim +++ b/syntax/dosini.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/dosini.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dot.vim b/syntax/dot.vim index 1f8d50ba..a2f442d3 100644 --- a/syntax/dot.vim +++ b/syntax/dot.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/dot.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/dot.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dracula.vim b/syntax/dracula.vim index 10c45b21..14b29922 100644 --- a/syntax/dracula.vim +++ b/syntax/dracula.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/dracula.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/dracula.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dsdl.vim b/syntax/dsdl.vim index db2ddb80..bf6818f9 100644 --- a/syntax/dsdl.vim +++ b/syntax/dsdl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/dsdl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/dsdl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dsl.vim b/syntax/dsl.vim index 602b1792..03fa01c7 100644 --- a/syntax/dsl.vim +++ b/syntax/dsl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/dsl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/dsl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dtd.vim b/syntax/dtd.vim index 2145b2f0..dfb0258e 100644 --- a/syntax/dtd.vim +++ b/syntax/dtd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/dtd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dts.vim b/syntax/dts.vim index 17a6f0be..e326fdef 100644 --- a/syntax/dts.vim +++ b/syntax/dts.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/dts.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/dts.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dune.vim b/syntax/dune.vim index 8433e47f..e4fdfd80 100644 --- a/syntax/dune.vim +++ b/syntax/dune.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/dune.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dylan.vim b/syntax/dylan.vim index d1db4dc0..101cd301 100644 --- a/syntax/dylan.vim +++ b/syntax/dylan.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/dylan.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/dylan.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dylanintr.vim b/syntax/dylanintr.vim index 65e645d6..ed531a47 100644 --- a/syntax/dylanintr.vim +++ b/syntax/dylanintr.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/dylanintr.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/dylanintr.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/dylanlid.vim b/syntax/dylanlid.vim index 0bdac435..0ad321d6 100644 --- a/syntax/dylanlid.vim +++ b/syntax/dylanlid.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/dylanlid.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/dylanlid.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ecd.vim b/syntax/ecd.vim index ef0973f1..eee18593 100644 --- a/syntax/ecd.vim +++ b/syntax/ecd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ecd.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ecd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ecrystal.vim b/syntax/ecrystal.vim index 7742ba15..bfcb07d8 100644 --- a/syntax/ecrystal.vim +++ b/syntax/ecrystal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ecrystal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/edif.vim b/syntax/edif.vim index 883cd77f..4271733a 100644 --- a/syntax/edif.vim +++ b/syntax/edif.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/edif.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/edif.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/eelixir.vim b/syntax/eelixir.vim index 92fe6a54..906a1d2b 100644 --- a/syntax/eelixir.vim +++ b/syntax/eelixir.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/eelixir.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/elf.vim b/syntax/elf.vim index 4dc7148d..5da19f96 100644 --- a/syntax/elf.vim +++ b/syntax/elf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/elf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/elf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/elinks.vim b/syntax/elinks.vim index 41215404..41b91fb3 100644 --- a/syntax/elinks.vim +++ b/syntax/elinks.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/elinks.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/elixir.vim b/syntax/elixir.vim index 8dee7cc4..ce3d51da 100644 --- a/syntax/elixir.vim +++ b/syntax/elixir.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/elixir.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/elm.vim b/syntax/elm.vim index 115c4edb..a7551514 100644 --- a/syntax/elm.vim +++ b/syntax/elm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/elm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/elm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/elmfilt.vim b/syntax/elmfilt.vim index d3e5820c..22ca2d14 100644 --- a/syntax/elmfilt.vim +++ b/syntax/elmfilt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/elmfilt.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/elmfilt.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/embeddedpuppet.vim b/syntax/embeddedpuppet.vim index eca80ced..024f49af 100644 --- a/syntax/embeddedpuppet.vim +++ b/syntax/embeddedpuppet.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/embeddedpuppet.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ember-script.vim b/syntax/ember-script.vim index df931b37..8023bc72 100644 --- a/syntax/ember-script.vim +++ b/syntax/ember-script.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ember-script.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/emblem.vim b/syntax/emblem.vim index b080ad7b..1c1971ff 100644 --- a/syntax/emblem.vim +++ b/syntax/emblem.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/emblem.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/erlang.vim b/syntax/erlang.vim index 83f3be8b..ad6cf13a 100644 --- a/syntax/erlang.vim +++ b/syntax/erlang.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/erlang.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/erlang.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/eruby.vim b/syntax/eruby.vim index 3be2b5de..bb48261d 100644 --- a/syntax/eruby.vim +++ b/syntax/eruby.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/eruby.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/esmtprc.vim b/syntax/esmtprc.vim index e9123c9a..50d7f384 100644 --- a/syntax/esmtprc.vim +++ b/syntax/esmtprc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/esmtprc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/esmtprc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/esqlc.vim b/syntax/esqlc.vim index ea13abde..90c757d8 100644 --- a/syntax/esqlc.vim +++ b/syntax/esqlc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/esqlc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/esqlc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/esterel.vim b/syntax/esterel.vim index b2e9298d..ac461884 100644 --- a/syntax/esterel.vim +++ b/syntax/esterel.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/esterel.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/esterel.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/eterm.vim b/syntax/eterm.vim index 1068f0d9..4e8ba54d 100644 --- a/syntax/eterm.vim +++ b/syntax/eterm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/eterm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/exim.vim b/syntax/exim.vim index dda5ef5c..8d73a662 100644 --- a/syntax/exim.vim +++ b/syntax/exim.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/exim.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/exim.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/expect.vim b/syntax/expect.vim index 7ee59f56..28d3daf5 100644 --- a/syntax/expect.vim +++ b/syntax/expect.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/expect.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/expect.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/exports.vim b/syntax/exports.vim index 3587f07a..6ec91b98 100644 --- a/syntax/exports.vim +++ b/syntax/exports.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/exports.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/exports.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/falcon.vim b/syntax/falcon.vim index 2b57e48b..500bb08e 100644 --- a/syntax/falcon.vim +++ b/syntax/falcon.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/falcon.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/fan.vim b/syntax/fan.vim index 9f7c6efc..929f1f91 100644 --- a/syntax/fan.vim +++ b/syntax/fan.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/fan.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/fan.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/fbs.vim b/syntax/fbs.vim index 82b826b3..76da1e0b 100644 --- a/syntax/fbs.vim +++ b/syntax/fbs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/fbs.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/fbs.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/fennel.vim b/syntax/fennel.vim index e25abac6..827abe04 100644 --- a/syntax/fennel.vim +++ b/syntax/fennel.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/fennel.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ferm.vim b/syntax/ferm.vim index 4a45b739..55af4ac4 100644 --- a/syntax/ferm.vim +++ b/syntax/ferm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ferm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ferm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/fetchmail.vim b/syntax/fetchmail.vim index 2e4a2575..2fb401d5 100644 --- a/syntax/fetchmail.vim +++ b/syntax/fetchmail.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/fetchmail.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/fgl.vim b/syntax/fgl.vim index 01b4d339..c115dd02 100644 --- a/syntax/fgl.vim +++ b/syntax/fgl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/fgl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/fgl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/fish.vim b/syntax/fish.vim index 5e55660e..9e39499f 100644 --- a/syntax/fish.vim +++ b/syntax/fish.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/fish.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/flow.vim b/syntax/flow.vim index 7999405c..12a2b4d2 100644 --- a/syntax/flow.vim +++ b/syntax/flow.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/flow.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/flow.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/focexec.vim b/syntax/focexec.vim index e43e5e2f..3e195913 100644 --- a/syntax/focexec.vim +++ b/syntax/focexec.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/focexec.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/focexec.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/forth.vim b/syntax/forth.vim index d3c8d309..c61b6a46 100644 --- a/syntax/forth.vim +++ b/syntax/forth.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/forth.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/forth.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/fortran.vim b/syntax/fortran.vim index 505b9b81..ea2ccfa5 100644 --- a/syntax/fortran.vim +++ b/syntax/fortran.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/fortran.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/framescript.vim b/syntax/framescript.vim index 1f0b99bf..ae7e8033 100644 --- a/syntax/framescript.vim +++ b/syntax/framescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/framescript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/freebasic.vim b/syntax/freebasic.vim index ed844b74..955d03a1 100644 --- a/syntax/freebasic.vim +++ b/syntax/freebasic.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/freebasic.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/freebasic.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/fsharp.vim b/syntax/fsharp.vim index d623207b..811ee00a 100644 --- a/syntax/fsharp.vim +++ b/syntax/fsharp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/fsharp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/fsharp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/fstab.vim b/syntax/fstab.vim index 02fc6d8b..6c0539f6 100644 --- a/syntax/fstab.vim +++ b/syntax/fstab.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/fstab.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/fstab.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/fvwm.vim b/syntax/fvwm.vim index 425c4cd8..e244f9d7 100644 --- a/syntax/fvwm.vim +++ b/syntax/fvwm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/fvwm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gdb.vim b/syntax/gdb.vim index d88b9b11..27aa26f5 100644 --- a/syntax/gdb.vim +++ b/syntax/gdb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/gdb.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gdmo.vim b/syntax/gdmo.vim index 370af462..01327e5c 100644 --- a/syntax/gdmo.vim +++ b/syntax/gdmo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gdmo.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gdmo.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gdscript3.vim b/syntax/gdscript3.vim index c14ac812..2b943443 100644 --- a/syntax/gdscript3.vim +++ b/syntax/gdscript3.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gdscript3.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gdscript3.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gedcom.vim b/syntax/gedcom.vim index 04628d09..64868ecc 100644 --- a/syntax/gedcom.vim +++ b/syntax/gedcom.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gedcom.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gedcom.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/git.vim b/syntax/git.vim index aa508353..13d5f5fb 100644 --- a/syntax/git.vim +++ b/syntax/git.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/git.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gitcommit.vim b/syntax/gitcommit.vim index 7e8babac..5b0d5e77 100644 --- a/syntax/gitcommit.vim +++ b/syntax/gitcommit.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/gitcommit.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gitconfig.vim b/syntax/gitconfig.vim index 95a54b3e..4aef73e3 100644 --- a/syntax/gitconfig.vim +++ b/syntax/gitconfig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/gitconfig.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gitignore.vim b/syntax/gitignore.vim index ba623829..f946f6b7 100644 --- a/syntax/gitignore.vim +++ b/syntax/gitignore.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/gitignore.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gitolite.vim b/syntax/gitolite.vim index 56989389..56f9268d 100644 --- a/syntax/gitolite.vim +++ b/syntax/gitolite.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gitolite.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gitolite.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gitrebase.vim b/syntax/gitrebase.vim index b36e9930..5cbda44c 100644 --- a/syntax/gitrebase.vim +++ b/syntax/gitrebase.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/gitrebase.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gitsendemail.vim b/syntax/gitsendemail.vim index 0d02129d..d60e448a 100644 --- a/syntax/gitsendemail.vim +++ b/syntax/gitsendemail.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/gitsendemail.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gkrellmrc.vim b/syntax/gkrellmrc.vim index acd8b85b..1c981869 100644 --- a/syntax/gkrellmrc.vim +++ b/syntax/gkrellmrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gkrellmrc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gkrellmrc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/glsl.vim b/syntax/glsl.vim index 12b30938..a2bdb8b0 100644 --- a/syntax/glsl.vim +++ b/syntax/glsl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/glsl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/glsl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gmpl.vim b/syntax/gmpl.vim index 18c65bf4..2b866453 100644 --- a/syntax/gmpl.vim +++ b/syntax/gmpl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gmpl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gmpl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gnash.vim b/syntax/gnash.vim index c1fdccf5..1adf335d 100644 --- a/syntax/gnash.vim +++ b/syntax/gnash.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gnash.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gnash.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gnuplot.vim b/syntax/gnuplot.vim index e66aa84a..734dbbf7 100644 --- a/syntax/gnuplot.vim +++ b/syntax/gnuplot.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gnuplot.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gnuplot.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/go.vim b/syntax/go.vim index 83fa7cb2..f546b91a 100644 --- a/syntax/go.vim +++ b/syntax/go.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/go.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/go.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/godebugoutput.vim b/syntax/godebugoutput.vim index 9577ca2f..483518bc 100644 --- a/syntax/godebugoutput.vim +++ b/syntax/godebugoutput.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/godebugoutput.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/godebugoutput.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/godebugstacktrace.vim b/syntax/godebugstacktrace.vim index 117b0458..c3964205 100644 --- a/syntax/godebugstacktrace.vim +++ b/syntax/godebugstacktrace.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/godebugstacktrace.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/godebugstacktrace.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/godebugvariables.vim b/syntax/godebugvariables.vim index bc353690..51d9fa3f 100644 --- a/syntax/godebugvariables.vim +++ b/syntax/godebugvariables.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/godebugvariables.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/godebugvariables.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/godefstack.vim b/syntax/godefstack.vim index 161296a2..228a8237 100644 --- a/syntax/godefstack.vim +++ b/syntax/godefstack.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/godefstack.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/godefstack.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gohtmltmpl.vim b/syntax/gohtmltmpl.vim index 6c5a095e..f38d9532 100644 --- a/syntax/gohtmltmpl.vim +++ b/syntax/gohtmltmpl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gohtmltmpl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gohtmltmpl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gomod.vim b/syntax/gomod.vim index 190f39ec..4e3cf484 100644 --- a/syntax/gomod.vim +++ b/syntax/gomod.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gomod.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gomod.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gotexttmpl.vim b/syntax/gotexttmpl.vim index 621324ec..a4af59a9 100644 --- a/syntax/gotexttmpl.vim +++ b/syntax/gotexttmpl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gotexttmpl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gotexttmpl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gp.vim b/syntax/gp.vim index 3f6aaa67..634bbd59 100644 --- a/syntax/gp.vim +++ b/syntax/gp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gpg.vim b/syntax/gpg.vim index b828cdc8..e227e22a 100644 --- a/syntax/gpg.vim +++ b/syntax/gpg.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/gpg.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/grads.vim b/syntax/grads.vim index 163f874c..e9efe050 100644 --- a/syntax/grads.vim +++ b/syntax/grads.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/grads.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/grads.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/graphql.vim b/syntax/graphql.vim index 834e9824..c3410528 100644 --- a/syntax/graphql.vim +++ b/syntax/graphql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/graphql.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gretl.vim b/syntax/gretl.vim index 491342ce..1ff069d4 100644 --- a/syntax/gretl.vim +++ b/syntax/gretl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gretl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gretl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/groovy.vim b/syntax/groovy.vim index acf9af51..0ccf8d34 100644 --- a/syntax/groovy.vim +++ b/syntax/groovy.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/groovy.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/group.vim b/syntax/group.vim index 0365cc96..4b06fc07 100644 --- a/syntax/group.vim +++ b/syntax/group.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/group.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/grub.vim b/syntax/grub.vim index b276985d..fafa4637 100644 --- a/syntax/grub.vim +++ b/syntax/grub.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/grub.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gsl.vim b/syntax/gsl.vim index be447527..9590530c 100644 --- a/syntax/gsl.vim +++ b/syntax/gsl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gsl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gsl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gsp.vim b/syntax/gsp.vim index 3b3f3a9f..1bbf3c0e 100644 --- a/syntax/gsp.vim +++ b/syntax/gsp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gsp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gsp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/gtkrc.vim b/syntax/gtkrc.vim index 830490e8..1a6d86f4 100644 --- a/syntax/gtkrc.vim +++ b/syntax/gtkrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/gtkrc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/gtkrc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/haml.vim b/syntax/haml.vim index 61c9c63a..32c6f794 100644 --- a/syntax/haml.vim +++ b/syntax/haml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/haml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/hamster.vim b/syntax/hamster.vim index 23fdb5f5..df1d17bc 100644 --- a/syntax/hamster.vim +++ b/syntax/hamster.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/hamster.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/handlebars.vim b/syntax/handlebars.vim index 3ecdbc54..1eba110a 100644 --- a/syntax/handlebars.vim +++ b/syntax/handlebars.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/handlebars.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/haproxy.vim b/syntax/haproxy.vim index b2796c48..df9bfd90 100644 --- a/syntax/haproxy.vim +++ b/syntax/haproxy.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/haproxy.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/haproxy.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/haskell.vim b/syntax/haskell.vim index e1f1c308..4f25ed8b 100644 --- a/syntax/haskell.vim +++ b/syntax/haskell.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/haskell.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/haskell.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/haste.vim b/syntax/haste.vim index 33ab9fff..1f75c950 100644 --- a/syntax/haste.vim +++ b/syntax/haste.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/haste.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/haste.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/hastepreproc.vim b/syntax/hastepreproc.vim index 40e42919..3228740c 100644 --- a/syntax/hastepreproc.vim +++ b/syntax/hastepreproc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/hastepreproc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/hastepreproc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/haxe.vim b/syntax/haxe.vim index 90f85dec..1ca9f40a 100644 --- a/syntax/haxe.vim +++ b/syntax/haxe.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/haxe.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/haxe.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/hb.vim b/syntax/hb.vim index b92ac3b2..524effc1 100644 --- a/syntax/hb.vim +++ b/syntax/hb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/hb.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/hb.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/hcl.vim b/syntax/hcl.vim index 96db23bf..b28e6d4f 100644 --- a/syntax/hcl.vim +++ b/syntax/hcl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/hcl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/helm.vim b/syntax/helm.vim index c3c4e1ba..012a44f8 100644 --- a/syntax/helm.vim +++ b/syntax/helm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/helm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/helm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/help.vim b/syntax/help.vim index afd6588a..53935fae 100644 --- a/syntax/help.vim +++ b/syntax/help.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/help.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/hercules.vim b/syntax/hercules.vim index c08283e3..37a35d4e 100644 --- a/syntax/hercules.vim +++ b/syntax/hercules.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/hercules.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/hercules.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/hex.vim b/syntax/hex.vim index 5ae880df..dcf932cd 100644 --- a/syntax/hex.vim +++ b/syntax/hex.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/hex.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/hex.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/hgcommit.vim b/syntax/hgcommit.vim index ad96c514..3c27e3b9 100644 --- a/syntax/hgcommit.vim +++ b/syntax/hgcommit.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/hgcommit.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/hive.vim b/syntax/hive.vim index 7bef1dc5..4c53ad7c 100644 --- a/syntax/hive.vim +++ b/syntax/hive.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/hive.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/hog.vim b/syntax/hog.vim index 1c6b89f6..68b0b91f 100644 --- a/syntax/hog.vim +++ b/syntax/hog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/hog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/hollywood.vim b/syntax/hollywood.vim index fef8c79e..9ca2dea2 100644 --- a/syntax/hollywood.vim +++ b/syntax/hollywood.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/hollywood.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/hollywood.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/hostconf.vim b/syntax/hostconf.vim index 90bb4937..2c912bc6 100644 --- a/syntax/hostconf.vim +++ b/syntax/hostconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/hostconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/hostsaccess.vim b/syntax/hostsaccess.vim index 100462dc..4882840e 100644 --- a/syntax/hostsaccess.vim +++ b/syntax/hostsaccess.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/hostsaccess.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/html.vim b/syntax/html.vim index d5699c3d..a505da2a 100644 --- a/syntax/html.vim +++ b/syntax/html.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/html.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/htmldjango.vim b/syntax/htmldjango.vim index c16cbb80..0282f30c 100644 --- a/syntax/htmldjango.vim +++ b/syntax/htmldjango.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/htmldjango.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/htmlm4.vim b/syntax/htmlm4.vim index 00915a95..834c86bf 100644 --- a/syntax/htmlm4.vim +++ b/syntax/htmlm4.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/htmlm4.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/htmlm4.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/i3config.vim b/syntax/i3config.vim index 957048ea..58dd81a0 100644 --- a/syntax/i3config.vim +++ b/syntax/i3config.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/i3config.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ibasic.vim b/syntax/ibasic.vim index 2725331f..2959ff72 100644 --- a/syntax/ibasic.vim +++ b/syntax/ibasic.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ibasic.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ibasic.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/icalendar.vim b/syntax/icalendar.vim index eb99cad2..1912bad8 100644 --- a/syntax/icalendar.vim +++ b/syntax/icalendar.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/icalendar.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/icalendar.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/icemenu.vim b/syntax/icemenu.vim index 68b30976..26efef5d 100644 --- a/syntax/icemenu.vim +++ b/syntax/icemenu.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/icemenu.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/icemenu.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/icon.vim b/syntax/icon.vim index d15d63ff..e5adba2b 100644 --- a/syntax/icon.vim +++ b/syntax/icon.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/icon.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/icon.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/idris.vim b/syntax/idris.vim index 15833ee6..34a7dc57 100644 --- a/syntax/idris.vim +++ b/syntax/idris.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/idris.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/idris2.vim b/syntax/idris2.vim index aa705578..b580cc02 100644 --- a/syntax/idris2.vim +++ b/syntax/idris2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/idris2.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/indent.vim b/syntax/indent.vim index 4a11ae59..bccbfa6b 100644 --- a/syntax/indent.vim +++ b/syntax/indent.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/indent.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/inform.vim b/syntax/inform.vim index 4ec5703f..86e56be4 100644 --- a/syntax/inform.vim +++ b/syntax/inform.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/inform.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/inform.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/initng.vim b/syntax/initng.vim index a9d74d3d..500d5570 100644 --- a/syntax/initng.vim +++ b/syntax/initng.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/initng.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/initng.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/inittab.vim b/syntax/inittab.vim index 534d2ce7..0f661b8f 100644 --- a/syntax/inittab.vim +++ b/syntax/inittab.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/inittab.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/inittab.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ion.vim b/syntax/ion.vim index 96d329e2..f8269815 100644 --- a/syntax/ion.vim +++ b/syntax/ion.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ion.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ipfilter.vim b/syntax/ipfilter.vim index c550b547..342ea34d 100644 --- a/syntax/ipfilter.vim +++ b/syntax/ipfilter.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ipfilter.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ipfilter.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/iss.vim b/syntax/iss.vim index 4e28e36f..970ada33 100644 --- a/syntax/iss.vim +++ b/syntax/iss.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/iss.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/iss.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ist.vim b/syntax/ist.vim index 390b9f7b..feb2206c 100644 --- a/syntax/ist.vim +++ b/syntax/ist.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ist.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ist.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/j.vim b/syntax/j.vim index 6275a955..e9937a08 100644 --- a/syntax/j.vim +++ b/syntax/j.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/j.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/jal.vim b/syntax/jal.vim index c72c1394..b34af2d1 100644 --- a/syntax/jal.vim +++ b/syntax/jal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/jal.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/jal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/jam.vim b/syntax/jam.vim index 53091ba9..2fd817fe 100644 --- a/syntax/jam.vim +++ b/syntax/jam.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/jam.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/jam.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/java.vim b/syntax/java.vim index 0ca7a195..c7648f21 100644 --- a/syntax/java.vim +++ b/syntax/java.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/java.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/javacc.vim b/syntax/javacc.vim index f00bb0da..e5c04192 100644 --- a/syntax/javacc.vim +++ b/syntax/javacc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/javacc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/javacc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/javascript.vim b/syntax/javascript.vim index 341e4a54..750ced5e 100644 --- a/syntax/javascript.vim +++ b/syntax/javascript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/javascript.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/javascript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/jess.vim b/syntax/jess.vim index 4f37959c..34ec059a 100644 --- a/syntax/jess.vim +++ b/syntax/jess.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/jess.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/jess.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/jgraph.vim b/syntax/jgraph.vim index d3b86a5a..9fcf50b6 100644 --- a/syntax/jgraph.vim +++ b/syntax/jgraph.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/jgraph.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/jgraph.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/jinja2.vim b/syntax/jinja2.vim index 3cbf38df..bb8a93fc 100644 --- a/syntax/jinja2.vim +++ b/syntax/jinja2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/jinja2.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/jinja2.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/jovial.vim b/syntax/jovial.vim index 9a350a60..fa07dd9c 100644 --- a/syntax/jovial.vim +++ b/syntax/jovial.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/jovial.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/jovial.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/jproperties.vim b/syntax/jproperties.vim index b8003df4..bac79637 100644 --- a/syntax/jproperties.vim +++ b/syntax/jproperties.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/jproperties.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/jq.vim b/syntax/jq.vim index dbfc6b52..9cc0072f 100644 --- a/syntax/jq.vim +++ b/syntax/jq.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/jq.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/json.vim b/syntax/json.vim index fe718b34..fa2b446f 100644 --- a/syntax/json.vim +++ b/syntax/json.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/json.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/json5.vim b/syntax/json5.vim index d3904ff1..73d7fb5c 100644 --- a/syntax/json5.vim +++ b/syntax/json5.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/json5.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/json5.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/jsonnet.vim b/syntax/jsonnet.vim index c3142d85..d8d60a13 100644 --- a/syntax/jsonnet.vim +++ b/syntax/jsonnet.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/jsonnet.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/jsp.vim b/syntax/jsp.vim index f474f75e..cc51e14c 100644 --- a/syntax/jsp.vim +++ b/syntax/jsp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/jsp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/jst.vim b/syntax/jst.vim index a364b5bf..9715066e 100644 --- a/syntax/jst.vim +++ b/syntax/jst.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/jst.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/jst.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/julia.vim b/syntax/julia.vim index 29e00bba..86c43f51 100644 --- a/syntax/julia.vim +++ b/syntax/julia.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/julia.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/juliadoc.vim b/syntax/juliadoc.vim index 2ae435c2..03eb5942 100644 --- a/syntax/juliadoc.vim +++ b/syntax/juliadoc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/juliadoc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/kconfig.vim b/syntax/kconfig.vim index 5a0ec852..ad3b03a7 100644 --- a/syntax/kconfig.vim +++ b/syntax/kconfig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/kconfig.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/kivy.vim b/syntax/kivy.vim index c71cff09..89ec7827 100644 --- a/syntax/kivy.vim +++ b/syntax/kivy.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/kivy.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/kivy.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/kix.vim b/syntax/kix.vim index 1e56a02f..74428bfa 100644 --- a/syntax/kix.vim +++ b/syntax/kix.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/kix.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/kix.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/kotlin.vim b/syntax/kotlin.vim index 4593234c..c3475323 100644 --- a/syntax/kotlin.vim +++ b/syntax/kotlin.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/kotlin.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/kscript.vim b/syntax/kscript.vim index caf54360..605142bc 100644 --- a/syntax/kscript.vim +++ b/syntax/kscript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/kscript.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/kscript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/kwt.vim b/syntax/kwt.vim index b4901358..68aa9e91 100644 --- a/syntax/kwt.vim +++ b/syntax/kwt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/kwt.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lace.vim b/syntax/lace.vim index 309a85bf..2df0706d 100644 --- a/syntax/lace.vim +++ b/syntax/lace.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lace.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lace.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/latte.vim b/syntax/latte.vim index fe94d9cc..d2c16ae2 100644 --- a/syntax/latte.vim +++ b/syntax/latte.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/latte.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/latte.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ld.vim b/syntax/ld.vim index dc51e15f..a4728d1b 100644 --- a/syntax/ld.vim +++ b/syntax/ld.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ld.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ldif.vim b/syntax/ldif.vim index 5f8f8922..6d6ef0a0 100644 --- a/syntax/ldif.vim +++ b/syntax/ldif.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ldif.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ldif.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ledger.vim b/syntax/ledger.vim index b768c834..2afccaad 100644 --- a/syntax/ledger.vim +++ b/syntax/ledger.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ledger.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ledger.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/less.vim b/syntax/less.vim index ee2a40bb..27b556c0 100644 --- a/syntax/less.vim +++ b/syntax/less.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/less.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lex.vim b/syntax/lex.vim index a4d62b11..94e84d37 100644 --- a/syntax/lex.vim +++ b/syntax/lex.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lex.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lex.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lftp.vim b/syntax/lftp.vim index 91695458..0845e2bb 100644 --- a/syntax/lftp.vim +++ b/syntax/lftp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/lftp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lhaskell.vim b/syntax/lhaskell.vim index a38b93c0..d40e915e 100644 --- a/syntax/lhaskell.vim +++ b/syntax/lhaskell.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lhaskell.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lhaskell.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/libao.vim b/syntax/libao.vim index 0080efe3..97896ee9 100644 --- a/syntax/libao.vim +++ b/syntax/libao.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/libao.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lidris.vim b/syntax/lidris.vim index 8f1ca1b3..b4219700 100644 --- a/syntax/lidris.vim +++ b/syntax/lidris.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lidris.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lidris.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lidris2.vim b/syntax/lidris2.vim index 277e1002..c78a09c8 100644 --- a/syntax/lidris2.vim +++ b/syntax/lidris2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lidris2.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lidris2.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lifelines.vim b/syntax/lifelines.vim index 2f92a7ec..44eb0c6d 100644 --- a/syntax/lifelines.vim +++ b/syntax/lifelines.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lifelines.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lifelines.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lilo.vim b/syntax/lilo.vim index 66c6c963..ac46d02a 100644 --- a/syntax/lilo.vim +++ b/syntax/lilo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lilo.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lilo.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lilypond-words.vim b/syntax/lilypond-words.vim index 43ad7c3d..b1ec97a0 100644 --- a/syntax/lilypond-words.vim +++ b/syntax/lilypond-words.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lilypond-words.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lilypond-words.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lilypond.vim b/syntax/lilypond.vim index 96b7df32..04a0f0e6 100644 --- a/syntax/lilypond.vim +++ b/syntax/lilypond.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/lilypond.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/limits.vim b/syntax/limits.vim index a8e434bf..4ffd72aa 100644 --- a/syntax/limits.vim +++ b/syntax/limits.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/limits.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/liquid.vim b/syntax/liquid.vim index fd8640ee..867e4a79 100644 --- a/syntax/liquid.vim +++ b/syntax/liquid.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/liquid.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lisp.vim b/syntax/lisp.vim index 9982330f..b4ecb439 100644 --- a/syntax/lisp.vim +++ b/syntax/lisp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/lisp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/litcoffee.vim b/syntax/litcoffee.vim index 5c30b805..f29cf526 100644 --- a/syntax/litcoffee.vim +++ b/syntax/litcoffee.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/litcoffee.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lite.vim b/syntax/lite.vim index 4ffd5378..5e43d1d7 100644 --- a/syntax/lite.vim +++ b/syntax/lite.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lite.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lite.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/litestep.vim b/syntax/litestep.vim index ca0ad369..72007dfb 100644 --- a/syntax/litestep.vim +++ b/syntax/litestep.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/litestep.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/litestep.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/llvm.vim b/syntax/llvm.vim index c276bf1a..8df88708 100644 --- a/syntax/llvm.vim +++ b/syntax/llvm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/llvm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/log.vim b/syntax/log.vim index 42af8315..9f025f6d 100644 --- a/syntax/log.vim +++ b/syntax/log.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/log.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/log.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/loginaccess.vim b/syntax/loginaccess.vim index ed9bbd74..3588ed95 100644 --- a/syntax/loginaccess.vim +++ b/syntax/loginaccess.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/loginaccess.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/logindefs.vim b/syntax/logindefs.vim index 6409a31e..7b3fd00b 100644 --- a/syntax/logindefs.vim +++ b/syntax/logindefs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/logindefs.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/logtalk.vim b/syntax/logtalk.vim index 5deb393e..e875c2d9 100644 --- a/syntax/logtalk.vim +++ b/syntax/logtalk.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/logtalk.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lotos.vim b/syntax/lotos.vim index 27f8512b..fdd82b86 100644 --- a/syntax/lotos.vim +++ b/syntax/lotos.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lotos.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lotos.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lout.vim b/syntax/lout.vim index 4c8982ac..b2ab49e5 100644 --- a/syntax/lout.vim +++ b/syntax/lout.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lout.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lout.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lpc.vim b/syntax/lpc.vim index 6fbff0c5..e83fd6d2 100644 --- a/syntax/lpc.vim +++ b/syntax/lpc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lpc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lpc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lprolog.vim b/syntax/lprolog.vim index 5541aa28..f3a9e06e 100644 --- a/syntax/lprolog.vim +++ b/syntax/lprolog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/lprolog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ls.vim b/syntax/ls.vim index 056d0abe..48d37a80 100644 --- a/syntax/ls.vim +++ b/syntax/ls.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ls.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lsl.vim b/syntax/lsl.vim index dfbec0c4..f624d2a5 100644 --- a/syntax/lsl.vim +++ b/syntax/lsl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lsl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lsl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lss.vim b/syntax/lss.vim index a7454369..4384acdf 100644 --- a/syntax/lss.vim +++ b/syntax/lss.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lss.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lss.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lua.vim b/syntax/lua.vim index 29ee33c6..29d78de8 100644 --- a/syntax/lua.vim +++ b/syntax/lua.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lua.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lua.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/lynx.vim b/syntax/lynx.vim index 13c96b84..fca7cc16 100644 --- a/syntax/lynx.vim +++ b/syntax/lynx.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/lynx.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/lynx.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/m4.vim b/syntax/m4.vim index 772a6985..04ff28cd 100644 --- a/syntax/m4.vim +++ b/syntax/m4.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/m4.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mail.vim b/syntax/mail.vim index dfa7069b..ed88f97f 100644 --- a/syntax/mail.vim +++ b/syntax/mail.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/mail.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mailaliases.vim b/syntax/mailaliases.vim index d2a37c22..6d2e9591 100644 --- a/syntax/mailaliases.vim +++ b/syntax/mailaliases.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/mailaliases.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mailcap.vim b/syntax/mailcap.vim index 82fe7986..0fa3da7c 100644 --- a/syntax/mailcap.vim +++ b/syntax/mailcap.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/mailcap.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/make.vim b/syntax/make.vim index cb04511a..3dc62458 100644 --- a/syntax/make.vim +++ b/syntax/make.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/make.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mako.vim b/syntax/mako.vim index 38aa67c3..aeaf4783 100644 --- a/syntax/mako.vim +++ b/syntax/mako.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/mako.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mallard.vim b/syntax/mallard.vim index 782c1446..f6d5664b 100644 --- a/syntax/mallard.vim +++ b/syntax/mallard.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/mallard.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/mallard.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/manconf.vim b/syntax/manconf.vim index 6e70d99d..09da2b34 100644 --- a/syntax/manconf.vim +++ b/syntax/manconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/manconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/maple.vim b/syntax/maple.vim index ddf0ab90..2042ab04 100644 --- a/syntax/maple.vim +++ b/syntax/maple.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/maple.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/maple.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/markdown.vim b/syntax/markdown.vim index f4a809fc..0cb4fa08 100644 --- a/syntax/markdown.vim +++ b/syntax/markdown.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/markdown.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mason.vim b/syntax/mason.vim index 6af8080d..11b39c5d 100644 --- a/syntax/mason.vim +++ b/syntax/mason.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/mason.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/mason.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/master.vim b/syntax/master.vim index cd4d7bf4..bd2a48a4 100644 --- a/syntax/master.vim +++ b/syntax/master.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/master.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/master.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mel.vim b/syntax/mel.vim index c0ab9109..bfbcbdbc 100644 --- a/syntax/mel.vim +++ b/syntax/mel.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/mel.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/mel.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/merlin.vim b/syntax/merlin.vim index cf2292c3..8d6df186 100644 --- a/syntax/merlin.vim +++ b/syntax/merlin.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/merlin.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/merlin.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/meson.vim b/syntax/meson.vim index 5153c88a..593bc1b6 100644 --- a/syntax/meson.vim +++ b/syntax/meson.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/meson.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/messages.vim b/syntax/messages.vim index d9669ee5..e5fb6846 100644 --- a/syntax/messages.vim +++ b/syntax/messages.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/messages.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/messages.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mf.vim b/syntax/mf.vim index c1a01c0a..120f502c 100644 --- a/syntax/mf.vim +++ b/syntax/mf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/mf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mgl.vim b/syntax/mgl.vim index c5960af4..dc82b690 100644 --- a/syntax/mgl.vim +++ b/syntax/mgl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/mgl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/mgl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mgp.vim b/syntax/mgp.vim index 2f9b545d..146370bb 100644 --- a/syntax/mgp.vim +++ b/syntax/mgp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/mgp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/mgp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mib.vim b/syntax/mib.vim index 238d3132..2427a6ff 100644 --- a/syntax/mib.vim +++ b/syntax/mib.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/mib.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/mib.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mix.vim b/syntax/mix.vim index 90ad0b5a..df9b0951 100644 --- a/syntax/mix.vim +++ b/syntax/mix.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/mix.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/mix.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mma.vim b/syntax/mma.vim index 01cbeb5d..e51133c5 100644 --- a/syntax/mma.vim +++ b/syntax/mma.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/mma.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mmp.vim b/syntax/mmp.vim index 5431a451..d0d82746 100644 --- a/syntax/mmp.vim +++ b/syntax/mmp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/mmp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/mmp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/modconf.vim b/syntax/modconf.vim index 5dc2a51b..d94e9e11 100644 --- a/syntax/modconf.vim +++ b/syntax/modconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/modconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/modula2.vim b/syntax/modula2.vim index a54d2309..1d14c554 100644 --- a/syntax/modula2.vim +++ b/syntax/modula2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/modula2.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/modula2.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/modula3.vim b/syntax/modula3.vim index 4a520f2c..0b64b9aa 100644 --- a/syntax/modula3.vim +++ b/syntax/modula3.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/modula3.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/modula3.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/monk.vim b/syntax/monk.vim index 9c0365dd..8f943899 100644 --- a/syntax/monk.vim +++ b/syntax/monk.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/monk.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/monk.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/moo.vim b/syntax/moo.vim index 0d8f11aa..e36c587e 100644 --- a/syntax/moo.vim +++ b/syntax/moo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/moo.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/moo.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/moon.vim b/syntax/moon.vim index 4d679a22..dba1188d 100644 --- a/syntax/moon.vim +++ b/syntax/moon.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/moon.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mp.vim b/syntax/mp.vim index 93be5d94..92e57fb3 100644 --- a/syntax/mp.vim +++ b/syntax/mp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/mp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mplayerconf.vim b/syntax/mplayerconf.vim index 25a7bdbb..dc50e1f4 100644 --- a/syntax/mplayerconf.vim +++ b/syntax/mplayerconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/mplayerconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mrxvtrc.vim b/syntax/mrxvtrc.vim index 5d3affe0..c7fbdc96 100644 --- a/syntax/mrxvtrc.vim +++ b/syntax/mrxvtrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/mrxvtrc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/msidl.vim b/syntax/msidl.vim index e654e0a3..2f779e26 100644 --- a/syntax/msidl.vim +++ b/syntax/msidl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/msidl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/msidl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/msql.vim b/syntax/msql.vim index e9cf6edf..aef3a3fd 100644 --- a/syntax/msql.vim +++ b/syntax/msql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/msql.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/msql.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mupad.vim b/syntax/mupad.vim index 933a68ff..deafcb30 100644 --- a/syntax/mupad.vim +++ b/syntax/mupad.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/mupad.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/mupad.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/murphi.vim b/syntax/murphi.vim index 7e1208a7..04e6faba 100644 --- a/syntax/murphi.vim +++ b/syntax/murphi.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/murphi.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/murphi.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mush.vim b/syntax/mush.vim index ac7cb6f2..902b0dbb 100644 --- a/syntax/mush.vim +++ b/syntax/mush.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/mush.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/mush.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mustache.vim b/syntax/mustache.vim index a620e6a3..ebcc7f49 100644 --- a/syntax/mustache.vim +++ b/syntax/mustache.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/mustache.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/muttrc.vim b/syntax/muttrc.vim index 0c4609e1..7d317e47 100644 --- a/syntax/muttrc.vim +++ b/syntax/muttrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/muttrc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/mysql.vim b/syntax/mysql.vim index 018a01e8..77de37a3 100644 --- a/syntax/mysql.vim +++ b/syntax/mysql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/mysql.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/mysql.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/n1ql.vim b/syntax/n1ql.vim index fa1648ef..bf68e7b9 100644 --- a/syntax/n1ql.vim +++ b/syntax/n1ql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/n1ql.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/n1ql.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/named.vim b/syntax/named.vim index d422ef3e..2ec365c3 100644 --- a/syntax/named.vim +++ b/syntax/named.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/named.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/named.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/nanorc.vim b/syntax/nanorc.vim index 93d6ecbe..ed33bf25 100644 --- a/syntax/nanorc.vim +++ b/syntax/nanorc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/nanorc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/natural.vim b/syntax/natural.vim index 6c6b2d79..02d72fbb 100644 --- a/syntax/natural.vim +++ b/syntax/natural.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/natural.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/natural.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ncf.vim b/syntax/ncf.vim index 5f05580c..0ecd27b0 100644 --- a/syntax/ncf.vim +++ b/syntax/ncf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ncf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ncf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/neomuttrc.vim b/syntax/neomuttrc.vim index 98c048b9..5e392906 100644 --- a/syntax/neomuttrc.vim +++ b/syntax/neomuttrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/neomuttrc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/netrc.vim b/syntax/netrc.vim index 7c036ea6..58726708 100644 --- a/syntax/netrc.vim +++ b/syntax/netrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/netrc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/nginx.vim b/syntax/nginx.vim index 9a0be5db..2c68c9e7 100644 --- a/syntax/nginx.vim +++ b/syntax/nginx.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/nginx.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/nim.vim b/syntax/nim.vim index f01213c1..0286bea8 100644 --- a/syntax/nim.vim +++ b/syntax/nim.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/nim.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/nim.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ninja.vim b/syntax/ninja.vim index 54dc9c6e..e8a1c623 100644 --- a/syntax/ninja.vim +++ b/syntax/ninja.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ninja.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ninja.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/nix.vim b/syntax/nix.vim index 047eded3..4b0557c6 100644 --- a/syntax/nix.vim +++ b/syntax/nix.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/nix.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/nqc.vim b/syntax/nqc.vim index 16e60128..74424de6 100644 --- a/syntax/nqc.vim +++ b/syntax/nqc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/nqc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/nqc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/nroff.vim b/syntax/nroff.vim index ea743fe6..bea5ddd1 100644 --- a/syntax/nroff.vim +++ b/syntax/nroff.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/nroff.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/nsis.vim b/syntax/nsis.vim index a3602d42..1577fd59 100644 --- a/syntax/nsis.vim +++ b/syntax/nsis.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/nsis.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/oasis.vim b/syntax/oasis.vim index 8534bcd4..450cfade 100644 --- a/syntax/oasis.vim +++ b/syntax/oasis.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/oasis.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/obj.vim b/syntax/obj.vim index cf409167..9108089d 100644 --- a/syntax/obj.vim +++ b/syntax/obj.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/obj.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/obj.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ocaml.vim b/syntax/ocaml.vim index ce8c4b75..3bdd77cd 100644 --- a/syntax/ocaml.vim +++ b/syntax/ocaml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ocaml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ocamlbuild_tags.vim b/syntax/ocamlbuild_tags.vim index 469ce7b8..34232425 100644 --- a/syntax/ocamlbuild_tags.vim +++ b/syntax/ocamlbuild_tags.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ocamlbuild_tags.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/occam.vim b/syntax/occam.vim index b0da63cb..a69329fc 100644 --- a/syntax/occam.vim +++ b/syntax/occam.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/occam.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ocpbuild.vim b/syntax/ocpbuild.vim index e644d6de..d3175eb1 100644 --- a/syntax/ocpbuild.vim +++ b/syntax/ocpbuild.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ocpbuild.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ocpbuild.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ocpbuildroot.vim b/syntax/ocpbuildroot.vim index cebc26b7..94ff36a5 100644 --- a/syntax/ocpbuildroot.vim +++ b/syntax/ocpbuildroot.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ocpbuildroot.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ocpbuildroot.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/octave.vim b/syntax/octave.vim index 686680a4..331567c2 100644 --- a/syntax/octave.vim +++ b/syntax/octave.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/octave.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/octave.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/odin.vim b/syntax/odin.vim index 23af1127..16036e43 100644 --- a/syntax/odin.vim +++ b/syntax/odin.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/odin.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/odin.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/omake.vim b/syntax/omake.vim index 8de5c2fc..38953ff5 100644 --- a/syntax/omake.vim +++ b/syntax/omake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/omake.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/omnimark.vim b/syntax/omnimark.vim index 11c9edb0..dc6cb019 100644 --- a/syntax/omnimark.vim +++ b/syntax/omnimark.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/omnimark.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/omnimark.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/opam.vim b/syntax/opam.vim index f9a8ee86..f487e851 100644 --- a/syntax/opam.vim +++ b/syntax/opam.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/opam.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/opam.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/opencl.vim b/syntax/opencl.vim index 8e82d0c4..6bcd63f3 100644 --- a/syntax/opencl.vim +++ b/syntax/opencl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/opencl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/openroad.vim b/syntax/openroad.vim index 022e4515..be96596c 100644 --- a/syntax/openroad.vim +++ b/syntax/openroad.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/openroad.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/openroad.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/opl.vim b/syntax/opl.vim index 8e19cc0f..4feffec9 100644 --- a/syntax/opl.vim +++ b/syntax/opl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/opl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/opl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ora.vim b/syntax/ora.vim index 68921f69..87722362 100644 --- a/syntax/ora.vim +++ b/syntax/ora.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ora.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ora.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pamconf.vim b/syntax/pamconf.vim index 12832522..14c751ad 100644 --- a/syntax/pamconf.vim +++ b/syntax/pamconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/pamconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pamenv.vim b/syntax/pamenv.vim index 49992c9a..2d158e4a 100644 --- a/syntax/pamenv.vim +++ b/syntax/pamenv.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/pamenv.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/pamenv.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/papp.vim b/syntax/papp.vim index 658da9cb..220aeee9 100644 --- a/syntax/papp.vim +++ b/syntax/papp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/papp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/papp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pascal.vim b/syntax/pascal.vim index ebcdc30d..038c5567 100644 --- a/syntax/pascal.vim +++ b/syntax/pascal.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/pascal.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/passwd.vim b/syntax/passwd.vim index 707dac36..ec8caae8 100644 --- a/syntax/passwd.vim +++ b/syntax/passwd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/passwd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pccts.vim b/syntax/pccts.vim index 353eb0e8..f9594aa3 100644 --- a/syntax/pccts.vim +++ b/syntax/pccts.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/pccts.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/pccts.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pdf.vim b/syntax/pdf.vim index 6ff6ed35..4a0a1c95 100644 --- a/syntax/pdf.vim +++ b/syntax/pdf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/pdf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/perl.vim b/syntax/perl.vim index b4316b13..f50a1dab 100644 --- a/syntax/perl.vim +++ b/syntax/perl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/perl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pf.vim b/syntax/pf.vim index cdd727c1..9c37cba3 100644 --- a/syntax/pf.vim +++ b/syntax/pf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/pf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/pf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pfmain.vim b/syntax/pfmain.vim index 1afe6b79..311ad05d 100644 --- a/syntax/pfmain.vim +++ b/syntax/pfmain.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/pfmain.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/pfmain.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pgsql.vim b/syntax/pgsql.vim index 4339eb42..108cc268 100644 --- a/syntax/pgsql.vim +++ b/syntax/pgsql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/pgsql.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/pgsql.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/php.vim b/syntax/php.vim index ef838254..79302961 100644 --- a/syntax/php.vim +++ b/syntax/php.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/php.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/php.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pike.vim b/syntax/pike.vim index 617a7438..b089a3ff 100644 --- a/syntax/pike.vim +++ b/syntax/pike.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/pike.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/pike.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pilrc.vim b/syntax/pilrc.vim index 3c7c413b..a463c82a 100644 --- a/syntax/pilrc.vim +++ b/syntax/pilrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/pilrc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/pilrc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pine.vim b/syntax/pine.vim index ef1f3977..647de9ff 100644 --- a/syntax/pine.vim +++ b/syntax/pine.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/pine.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/pine.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pinfo.vim b/syntax/pinfo.vim index e2b8fcd7..09404137 100644 --- a/syntax/pinfo.vim +++ b/syntax/pinfo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/pinfo.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/plantuml.vim b/syntax/plantuml.vim index 84ad75fe..d4185ffb 100644 --- a/syntax/plantuml.vim +++ b/syntax/plantuml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/plantuml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pli.vim b/syntax/pli.vim index c10363af..72a075c0 100644 --- a/syntax/pli.vim +++ b/syntax/pli.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/pli.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/pli.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/plm.vim b/syntax/plm.vim index c727f2fa..d81672e9 100644 --- a/syntax/plm.vim +++ b/syntax/plm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/plm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/plm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/plp.vim b/syntax/plp.vim index d5f98d60..29ac1503 100644 --- a/syntax/plp.vim +++ b/syntax/plp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/plp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/plp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/plsql.vim b/syntax/plsql.vim index 867a9498..c40575a8 100644 --- a/syntax/plsql.vim +++ b/syntax/plsql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/plsql.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/plsql.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/po.vim b/syntax/po.vim index efda99b8..217eebc3 100644 --- a/syntax/po.vim +++ b/syntax/po.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/po.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/po.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pod.vim b/syntax/pod.vim index a0292161..68c55460 100644 --- a/syntax/pod.vim +++ b/syntax/pod.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/pod.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/pod.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pony.vim b/syntax/pony.vim index 770c8257..a0d3d959 100644 --- a/syntax/pony.vim +++ b/syntax/pony.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/pony.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/postscr.vim b/syntax/postscr.vim index fdc83cea..8aeea630 100644 --- a/syntax/postscr.vim +++ b/syntax/postscr.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/postscr.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pov.vim b/syntax/pov.vim index 357ddbc2..5873d934 100644 --- a/syntax/pov.vim +++ b/syntax/pov.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/pov.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/pov.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/povini.vim b/syntax/povini.vim index 773124af..59942965 100644 --- a/syntax/povini.vim +++ b/syntax/povini.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/povini.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/povini.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ppd.vim b/syntax/ppd.vim index 6418cde8..7ba5a53c 100644 --- a/syntax/ppd.vim +++ b/syntax/ppd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ppd.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ppd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ppwiz.vim b/syntax/ppwiz.vim index 17d43a1e..2cb20d70 100644 --- a/syntax/ppwiz.vim +++ b/syntax/ppwiz.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ppwiz.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ppwiz.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/privoxy.vim b/syntax/privoxy.vim index 3660977b..31ffb85d 100644 --- a/syntax/privoxy.vim +++ b/syntax/privoxy.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/privoxy.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/privoxy.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/procmail.vim b/syntax/procmail.vim index 104f0bab..137db9e4 100644 --- a/syntax/procmail.vim +++ b/syntax/procmail.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/procmail.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/prolog.vim b/syntax/prolog.vim index 60545b07..2ba79f43 100644 --- a/syntax/prolog.vim +++ b/syntax/prolog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/prolog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/promela.vim b/syntax/promela.vim index 6c09d59a..f91e8588 100644 --- a/syntax/promela.vim +++ b/syntax/promela.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/promela.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/promela.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/proto.vim b/syntax/proto.vim index 62d0fab9..cc1e6f9d 100644 --- a/syntax/proto.vim +++ b/syntax/proto.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/proto.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/proto.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/protocols.vim b/syntax/protocols.vim index 986530a9..978f6810 100644 --- a/syntax/protocols.vim +++ b/syntax/protocols.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/protocols.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ps1.vim b/syntax/ps1.vim index 9d9d2f28..8a80cf38 100644 --- a/syntax/ps1.vim +++ b/syntax/ps1.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ps1.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ps1xml.vim b/syntax/ps1xml.vim index 0032d2fa..3e341afd 100644 --- a/syntax/ps1xml.vim +++ b/syntax/ps1xml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ps1xml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/psf.vim b/syntax/psf.vim index 2be42943..e5657e2c 100644 --- a/syntax/psf.vim +++ b/syntax/psf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/psf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/psf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pug.vim b/syntax/pug.vim index 880ea6d2..ceb6ebe2 100644 --- a/syntax/pug.vim +++ b/syntax/pug.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/pug.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/puppet.vim b/syntax/puppet.vim index 9ca98f9a..e6239a84 100644 --- a/syntax/puppet.vim +++ b/syntax/puppet.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/puppet.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/purescript.vim b/syntax/purescript.vim index f8a396ce..259dab78 100644 --- a/syntax/purescript.vim +++ b/syntax/purescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/purescript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/pyrex.vim b/syntax/pyrex.vim index 9d7fa464..6ebb423b 100644 --- a/syntax/pyrex.vim +++ b/syntax/pyrex.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/pyrex.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/python.vim b/syntax/python.vim index b7dcac5a..8ace6f03 100644 --- a/syntax/python.vim +++ b/syntax/python.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/python.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/python.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/qmake.vim b/syntax/qmake.vim index 4f3a748f..74708ece 100644 --- a/syntax/qmake.vim +++ b/syntax/qmake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/qmake.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/qmake.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/qml.vim b/syntax/qml.vim index 3189be60..e3006ebf 100644 --- a/syntax/qml.vim +++ b/syntax/qml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/qml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/quake.vim b/syntax/quake.vim index 5d27ae2b..413a1c56 100644 --- a/syntax/quake.vim +++ b/syntax/quake.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/quake.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/racket.vim b/syntax/racket.vim index 4988ac30..ecd4eda6 100644 --- a/syntax/racket.vim +++ b/syntax/racket.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/racket.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/radiance.vim b/syntax/radiance.vim index d608e036..e77f64e2 100644 --- a/syntax/radiance.vim +++ b/syntax/radiance.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/radiance.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/radiance.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ragel.vim b/syntax/ragel.vim index 605aeb18..37697ef7 100644 --- a/syntax/ragel.vim +++ b/syntax/ragel.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ragel.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ragel.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/raku.vim b/syntax/raku.vim index 510a2e23..137fa7e0 100644 --- a/syntax/raku.vim +++ b/syntax/raku.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/raku.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/raml.vim b/syntax/raml.vim index 5ba1c953..a3684763 100644 --- a/syntax/raml.vim +++ b/syntax/raml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/raml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ratpoison.vim b/syntax/ratpoison.vim index ef8ad5a8..b6e25067 100644 --- a/syntax/ratpoison.vim +++ b/syntax/ratpoison.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/ratpoison.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/ratpoison.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/razor.vim b/syntax/razor.vim index 61429dfc..de924761 100644 --- a/syntax/razor.vim +++ b/syntax/razor.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/razor.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rc.vim b/syntax/rc.vim index 09234404..d5b658c0 100644 --- a/syntax/rc.vim +++ b/syntax/rc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/rc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/rc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rcs.vim b/syntax/rcs.vim index 62c7c81d..4dfab84a 100644 --- a/syntax/rcs.vim +++ b/syntax/rcs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/rcs.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/rcs.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/readline.vim b/syntax/readline.vim index 014802c0..33a733f3 100644 --- a/syntax/readline.vim +++ b/syntax/readline.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/readline.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/reason.vim b/syntax/reason.vim index e98bf608..62b83c5f 100644 --- a/syntax/reason.vim +++ b/syntax/reason.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/reason.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/reason.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rego.vim b/syntax/rego.vim index 5fc0a6a2..c34a9780 100644 --- a/syntax/rego.vim +++ b/syntax/rego.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/rego.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/rego.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/remind.vim b/syntax/remind.vim index 40501da6..9ca10b49 100644 --- a/syntax/remind.vim +++ b/syntax/remind.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/remind.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/remind.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/requirements.vim b/syntax/requirements.vim index 63289155..0167b41f 100644 --- a/syntax/requirements.vim +++ b/syntax/requirements.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/requirements.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/requirements.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/resolv.vim b/syntax/resolv.vim index 0f0f1734..b151ecd2 100644 --- a/syntax/resolv.vim +++ b/syntax/resolv.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/resolv.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/resolv.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/reva.vim b/syntax/reva.vim index e4175f55..0cc6c60d 100644 --- a/syntax/reva.vim +++ b/syntax/reva.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/reva.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rexx.vim b/syntax/rexx.vim index f9310fb8..fb9c6d55 100644 --- a/syntax/rexx.vim +++ b/syntax/rexx.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/rexx.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/rexx.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rhelp.vim b/syntax/rhelp.vim index ca7af315..21c602d9 100644 --- a/syntax/rhelp.vim +++ b/syntax/rhelp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/rhelp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/rhelp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rib.vim b/syntax/rib.vim index eac47d85..279377fb 100644 --- a/syntax/rib.vim +++ b/syntax/rib.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/rib.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/rib.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rmd.vim b/syntax/rmd.vim index dd8292cd..555f102a 100644 --- a/syntax/rmd.vim +++ b/syntax/rmd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/rmd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rnc.vim b/syntax/rnc.vim index c07c7a0d..4226f53c 100644 --- a/syntax/rnc.vim +++ b/syntax/rnc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/rnc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rng.vim b/syntax/rng.vim index 75de79f4..947f2436 100644 --- a/syntax/rng.vim +++ b/syntax/rng.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/rng.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/rng.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rnoweb-1.vim b/syntax/rnoweb-1.vim index aa6b2b9e..7e2f2a6f 100644 --- a/syntax/rnoweb-1.vim +++ b/syntax/rnoweb-1.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/rnoweb.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rnoweb-2.vim b/syntax/rnoweb-2.vim index daba14c7..f2c1b831 100644 --- a/syntax/rnoweb-2.vim +++ b/syntax/rnoweb-2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/rnoweb-2.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/rnoweb-2.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/robots.vim b/syntax/robots.vim index e2b5ecdd..f6e428c0 100644 --- a/syntax/robots.vim +++ b/syntax/robots.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/robots.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/robots.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rpcgen.vim b/syntax/rpcgen.vim index ee911f4e..4deb9a5c 100644 --- a/syntax/rpcgen.vim +++ b/syntax/rpcgen.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/rpcgen.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/rpcgen.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rpl.vim b/syntax/rpl.vim index 3f49ccf1..3ebd6347 100644 --- a/syntax/rpl.vim +++ b/syntax/rpl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/rpl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rrst.vim b/syntax/rrst.vim index 57620048..fde794cc 100644 --- a/syntax/rrst.vim +++ b/syntax/rrst.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/rrst.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rst.vim b/syntax/rst.vim index 6a729d1d..337ade93 100644 --- a/syntax/rst.vim +++ b/syntax/rst.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/rst.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rtf.vim b/syntax/rtf.vim index 1528dab8..24b12498 100644 --- a/syntax/rtf.vim +++ b/syntax/rtf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/rtf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/rtf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/ruby.vim b/syntax/ruby.vim index f61566ec..8621075f 100644 --- a/syntax/ruby.vim +++ b/syntax/ruby.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/ruby.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/rust.vim b/syntax/rust.vim index 90fce408..0c712813 100644 --- a/syntax/rust.vim +++ b/syntax/rust.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/rust.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/samba.vim b/syntax/samba.vim index e9bff267..0f6910b6 100644 --- a/syntax/samba.vim +++ b/syntax/samba.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/samba.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/samba.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sas.vim b/syntax/sas.vim index ba85b4fb..80490b6a 100644 --- a/syntax/sas.vim +++ b/syntax/sas.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sas.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sas.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sass.vim b/syntax/sass.vim index e9b4be3b..777a3b96 100644 --- a/syntax/sass.vim +++ b/syntax/sass.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/sass.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sather.vim b/syntax/sather.vim index 70a1eaae..f610e92d 100644 --- a/syntax/sather.vim +++ b/syntax/sather.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sather.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sather.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sbt.vim b/syntax/sbt.vim index ee59f9b1..2a8d75fa 100644 --- a/syntax/sbt.vim +++ b/syntax/sbt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/sbt.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/scala.vim b/syntax/scala.vim index f4b0406d..f6f2df9a 100644 --- a/syntax/scala.vim +++ b/syntax/scala.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/scala.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/scheme.vim b/syntax/scheme.vim index 25fc6dcc..ee9c1ea4 100644 --- a/syntax/scheme.vim +++ b/syntax/scheme.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/scheme.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/scilab.vim b/syntax/scilab.vim index 3b311f6c..a551b8a2 100644 --- a/syntax/scilab.vim +++ b/syntax/scilab.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/scilab.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/scilab.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/screen.vim b/syntax/screen.vim index bcafa9e2..11da09e2 100644 --- a/syntax/screen.vim +++ b/syntax/screen.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/screen.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/scss.vim b/syntax/scss.vim index 73345678..03f311b7 100644 --- a/syntax/scss.vim +++ b/syntax/scss.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/scss.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sd.vim b/syntax/sd.vim index dde0f4f7..ddc1c0ec 100644 --- a/syntax/sd.vim +++ b/syntax/sd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sd.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sdc.vim b/syntax/sdc.vim index 4d9db312..82995462 100644 --- a/syntax/sdc.vim +++ b/syntax/sdc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sdc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sdc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sdl.vim b/syntax/sdl.vim index 1b13ac4a..c8a2b38e 100644 --- a/syntax/sdl.vim +++ b/syntax/sdl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sdl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sdl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sed.vim b/syntax/sed.vim index 338b5cc3..854c3229 100644 --- a/syntax/sed.vim +++ b/syntax/sed.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sed.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sed.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sensors.vim b/syntax/sensors.vim index 087e7fae..ae08c54c 100644 --- a/syntax/sensors.vim +++ b/syntax/sensors.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/sensors.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/services.vim b/syntax/services.vim index fae3e65e..a70be927 100644 --- a/syntax/services.vim +++ b/syntax/services.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/services.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/setserial.vim b/syntax/setserial.vim index 43a5f73f..27188699 100644 --- a/syntax/setserial.vim +++ b/syntax/setserial.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/setserial.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sexplib.vim b/syntax/sexplib.vim index ff669244..65ae8b2b 100644 --- a/syntax/sexplib.vim +++ b/syntax/sexplib.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/sexplib.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sh.vim b/syntax/sh.vim index 3abe2d9d..f7f49184 100644 --- a/syntax/sh.vim +++ b/syntax/sh.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sh.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sh.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sieve.vim b/syntax/sieve.vim index 8d8ad8f2..1bf06c86 100644 --- a/syntax/sieve.vim +++ b/syntax/sieve.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/sieve.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sil.vim b/syntax/sil.vim index a4bf5359..8f49c690 100644 --- a/syntax/sil.vim +++ b/syntax/sil.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sil.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sil.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/simula.vim b/syntax/simula.vim index 5d83519e..95579e3b 100644 --- a/syntax/simula.vim +++ b/syntax/simula.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/simula.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/simula.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sinda.vim b/syntax/sinda.vim index 27f22df6..6f257bbd 100644 --- a/syntax/sinda.vim +++ b/syntax/sinda.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sinda.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sinda.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sisu.vim b/syntax/sisu.vim index f703e138..7d5bedba 100644 --- a/syntax/sisu.vim +++ b/syntax/sisu.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sisu.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sisu.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/skill.vim b/syntax/skill.vim index ed1c1975..61f1a2e9 100644 --- a/syntax/skill.vim +++ b/syntax/skill.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/skill.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/skill.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/slang.vim b/syntax/slang.vim index 92bd79e3..b92ac736 100644 --- a/syntax/slang.vim +++ b/syntax/slang.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/slang.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/slang.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/slice.vim b/syntax/slice.vim index 6b595d08..d9b16e64 100644 --- a/syntax/slice.vim +++ b/syntax/slice.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/slice.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/slice.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/slim.vim b/syntax/slim.vim index 91f74f98..4d6ee3d6 100644 --- a/syntax/slim.vim +++ b/syntax/slim.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/slim.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/slime.vim b/syntax/slime.vim index b47b79bc..4420e95a 100644 --- a/syntax/slime.vim +++ b/syntax/slime.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/slime.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/slime.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/slpconf.vim b/syntax/slpconf.vim index 1c70cbff..93c081f5 100644 --- a/syntax/slpconf.vim +++ b/syntax/slpconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/slpconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/slpreg.vim b/syntax/slpreg.vim index 26b5c09d..5aa34439 100644 --- a/syntax/slpreg.vim +++ b/syntax/slpreg.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/slpreg.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/slpspi.vim b/syntax/slpspi.vim index 7c78ff5b..93607f48 100644 --- a/syntax/slpspi.vim +++ b/syntax/slpspi.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/slpspi.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/slrnrc.vim b/syntax/slrnrc.vim index 5f03453e..f609aff8 100644 --- a/syntax/slrnrc.vim +++ b/syntax/slrnrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/slrnrc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/slrnrc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/slrnsc.vim b/syntax/slrnsc.vim index 3d168331..fdc527e8 100644 --- a/syntax/slrnsc.vim +++ b/syntax/slrnsc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/slrnsc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/slrnsc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sm.vim b/syntax/sm.vim index b1336a6c..7187d484 100644 --- a/syntax/sm.vim +++ b/syntax/sm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/smarty.vim b/syntax/smarty.vim index edda9d81..b6c245a3 100644 --- a/syntax/smarty.vim +++ b/syntax/smarty.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/smarty.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/smarty.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/smcl.vim b/syntax/smcl.vim index 02444356..6c83bb89 100644 --- a/syntax/smcl.vim +++ b/syntax/smcl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/smcl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/smcl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/smhl.vim b/syntax/smhl.vim index 6e827414..3dbbd9d3 100644 --- a/syntax/smhl.vim +++ b/syntax/smhl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/smhl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/smhl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/smith.vim b/syntax/smith.vim index 10b5b55b..09a7aa87 100644 --- a/syntax/smith.vim +++ b/syntax/smith.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/smith.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/smith.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sml.vim b/syntax/sml.vim index 1970e999..7e74d168 100644 --- a/syntax/sml.vim +++ b/syntax/sml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/smt2.vim b/syntax/smt2.vim index 0ca504ea..adae886d 100644 --- a/syntax/smt2.vim +++ b/syntax/smt2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/smt2.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/snobol4.vim b/syntax/snobol4.vim index a2787f15..b24798a0 100644 --- a/syntax/snobol4.vim +++ b/syntax/snobol4.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/snobol4.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/snobol4.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/solidity.vim b/syntax/solidity.vim index 4f2a15e5..90f48dac 100644 --- a/syntax/solidity.vim +++ b/syntax/solidity.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/solidity.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/spec.vim b/syntax/spec.vim index 3d7cf35d..4dee097d 100644 --- a/syntax/spec.vim +++ b/syntax/spec.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/spec.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/spice.vim b/syntax/spice.vim index 42c882cb..92ebb5f9 100644 --- a/syntax/spice.vim +++ b/syntax/spice.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/spice.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/spice.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/spup.vim b/syntax/spup.vim index de338995..51c4bb53 100644 --- a/syntax/spup.vim +++ b/syntax/spup.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/spup.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/spup.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/spyce.vim b/syntax/spyce.vim index 24bf358d..e2a1a3d7 100644 --- a/syntax/spyce.vim +++ b/syntax/spyce.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/spyce.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/spyce.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sql.vim b/syntax/sql.vim index e0979489..46fc5d67 100644 --- a/syntax/sql.vim +++ b/syntax/sql.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/sql.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sqlj.vim b/syntax/sqlj.vim index 74193bc3..f2623dc4 100644 --- a/syntax/sqlj.vim +++ b/syntax/sqlj.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sqlj.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sqlj.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sqloracle.vim b/syntax/sqloracle.vim index 494f8c91..7eacd6e6 100644 --- a/syntax/sqloracle.vim +++ b/syntax/sqloracle.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sqloracle.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sqloracle.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sqr.vim b/syntax/sqr.vim index 89474ff3..4524dea4 100644 --- a/syntax/sqr.vim +++ b/syntax/sqr.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sqr.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sqr.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/squid.vim b/syntax/squid.vim index 05d4dd7e..d9c62015 100644 --- a/syntax/squid.vim +++ b/syntax/squid.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/squid.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/squid.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/srec.vim b/syntax/srec.vim index 5375700e..9c2b4ce3 100644 --- a/syntax/srec.vim +++ b/syntax/srec.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/srec.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/srec.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sshconfig.vim b/syntax/sshconfig.vim index 7ba0d05f..5b6346f3 100644 --- a/syntax/sshconfig.vim +++ b/syntax/sshconfig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/sshconfig.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sshdconfig.vim b/syntax/sshdconfig.vim index 49c9d1f6..1c6b6db5 100644 --- a/syntax/sshdconfig.vim +++ b/syntax/sshdconfig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sshdconfig.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sshdconfig.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/st.vim b/syntax/st.vim index c5ea4850..1b46c7b6 100644 --- a/syntax/st.vim +++ b/syntax/st.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/st.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/st.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/stata.vim b/syntax/stata.vim index 9a972ad0..be04f59c 100644 --- a/syntax/stata.vim +++ b/syntax/stata.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/stata.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/stata.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/stp.vim b/syntax/stp.vim index 04c70fe4..bab05d2d 100644 --- a/syntax/stp.vim +++ b/syntax/stp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/stp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/stp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/stylus.vim b/syntax/stylus.vim index 0f32d2d8..a77c9fa1 100644 --- a/syntax/stylus.vim +++ b/syntax/stylus.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/stylus.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sudoers.vim b/syntax/sudoers.vim index 4482fac7..aa16986f 100644 --- a/syntax/sudoers.vim +++ b/syntax/sudoers.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/sudoers.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/svelte.vim b/syntax/svelte.vim index 377964e6..c452182f 100644 --- a/syntax/svelte.vim +++ b/syntax/svelte.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/svelte.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/svg.vim b/syntax/svg.vim index 676cfc9f..166e3e29 100644 --- a/syntax/svg.vim +++ b/syntax/svg.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/svg.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/svg.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/svn.vim b/syntax/svn.vim index ae7f7875..33340ea9 100644 --- a/syntax/svn.vim +++ b/syntax/svn.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/svn.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/svn.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/swift.vim b/syntax/swift.vim index 26d9d7a0..b4207bb0 100644 --- a/syntax/swift.vim +++ b/syntax/swift.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/swift.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/swiftgyb.vim b/syntax/swiftgyb.vim index b85fe036..39cad20d 100644 --- a/syntax/swiftgyb.vim +++ b/syntax/swiftgyb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/swiftgyb.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sxhkdrc.vim b/syntax/sxhkdrc.vim index 7f413409..cabfe498 100644 --- a/syntax/sxhkdrc.vim +++ b/syntax/sxhkdrc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/sxhkdrc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/sxhkdrc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/sysctl.vim b/syntax/sysctl.vim index 1fccb984..6e611f06 100644 --- a/syntax/sysctl.vim +++ b/syntax/sysctl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/sysctl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/systemd.vim b/syntax/systemd.vim index d7219719..eccf6c8f 100644 --- a/syntax/systemd.vim +++ b/syntax/systemd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/systemd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/systemverilog.vim b/syntax/systemverilog.vim index 823780ad..dc27e532 100644 --- a/syntax/systemverilog.vim +++ b/syntax/systemverilog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/systemverilog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tablegen.vim b/syntax/tablegen.vim index ab77c623..4cd21e32 100644 --- a/syntax/tablegen.vim +++ b/syntax/tablegen.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/tablegen.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tads.vim b/syntax/tads.vim index e47cad71..c38d4b57 100644 --- a/syntax/tads.vim +++ b/syntax/tads.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tads.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tads.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tags.vim b/syntax/tags.vim index b3b5b36d..eb121a78 100644 --- a/syntax/tags.vim +++ b/syntax/tags.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/tags.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tak.vim b/syntax/tak.vim index 14922939..00b76ccb 100644 --- a/syntax/tak.vim +++ b/syntax/tak.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tak.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tak.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tap.vim b/syntax/tap.vim index ff491f39..d38b960b 100644 --- a/syntax/tap.vim +++ b/syntax/tap.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tap.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tap.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/taskdata.vim b/syntax/taskdata.vim index e0b18445..ca3165f9 100644 --- a/syntax/taskdata.vim +++ b/syntax/taskdata.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/taskdata.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/taskdata.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/taskedit.vim b/syntax/taskedit.vim index d3674f90..736805f6 100644 --- a/syntax/taskedit.vim +++ b/syntax/taskedit.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/taskedit.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/taskedit.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tcl.vim b/syntax/tcl.vim index f03c1347..76bd5eb8 100644 --- a/syntax/tcl.vim +++ b/syntax/tcl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/tcl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/template.vim b/syntax/template.vim index c2cd69aa..477c8e04 100644 --- a/syntax/template.vim +++ b/syntax/template.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/template.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/template.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/teraterm.vim b/syntax/teraterm.vim index db59b231..44d66ef6 100644 --- a/syntax/teraterm.vim +++ b/syntax/teraterm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/teraterm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/teraterm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/terminfo.vim b/syntax/terminfo.vim index 2251ff6e..1933c734 100644 --- a/syntax/terminfo.vim +++ b/syntax/terminfo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/terminfo.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/terraform.vim b/syntax/terraform.vim index 2339c23f..e071ce8d 100644 --- a/syntax/terraform.vim +++ b/syntax/terraform.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/terraform.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tex.vim b/syntax/tex.vim index ecbc66f7..45d763cb 100644 --- a/syntax/tex.vim +++ b/syntax/tex.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/tex.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/texinfo.vim b/syntax/texinfo.vim index be333cd2..f76c9b60 100644 --- a/syntax/texinfo.vim +++ b/syntax/texinfo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/texinfo.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/texinfo.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/texmf.vim b/syntax/texmf.vim index f55de21c..ae1cbe36 100644 --- a/syntax/texmf.vim +++ b/syntax/texmf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/texmf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/texmf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/textile.vim b/syntax/textile.vim index e5ccc7ae..65a1953b 100644 --- a/syntax/textile.vim +++ b/syntax/textile.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/textile.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tf.vim b/syntax/tf.vim index 0bc23785..b12663cb 100644 --- a/syntax/tf.vim +++ b/syntax/tf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tf.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/thrift.vim b/syntax/thrift.vim index aaa546a4..da97a715 100644 --- a/syntax/thrift.vim +++ b/syntax/thrift.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/thrift.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/thrift.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tidy.vim b/syntax/tidy.vim index 2ace1fc0..4ba65155 100644 --- a/syntax/tidy.vim +++ b/syntax/tidy.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tidy.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tidy.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tilde.vim b/syntax/tilde.vim index d67f89ea..11012e95 100644 --- a/syntax/tilde.vim +++ b/syntax/tilde.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tilde.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tilde.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tli.vim b/syntax/tli.vim index 87b85fd4..c177878a 100644 --- a/syntax/tli.vim +++ b/syntax/tli.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tli.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tli.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tmux.vim b/syntax/tmux.vim index f992751f..9d72c5f7 100644 --- a/syntax/tmux.vim +++ b/syntax/tmux.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/tmux.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/toml.vim b/syntax/toml.vim index 43c6e87e..49d1141a 100644 --- a/syntax/toml.vim +++ b/syntax/toml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/toml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tpp.vim b/syntax/tpp.vim index 7057879f..c728e23d 100644 --- a/syntax/tpp.vim +++ b/syntax/tpp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tpp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tpp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tptp.vim b/syntax/tptp.vim index 7c29b43f..81164ff5 100644 --- a/syntax/tptp.vim +++ b/syntax/tptp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tptp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tptp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/trasys.vim b/syntax/trasys.vim index bd521439..23ce0587 100644 --- a/syntax/trasys.vim +++ b/syntax/trasys.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/trasys.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/trasys.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/treetop.vim b/syntax/treetop.vim index 53cf7718..b7dea563 100644 --- a/syntax/treetop.vim +++ b/syntax/treetop.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/treetop.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/trustees.vim b/syntax/trustees.vim index 7a29a667..f7514282 100644 --- a/syntax/trustees.vim +++ b/syntax/trustees.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/trustees.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/trustees.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tsalt.vim b/syntax/tsalt.vim index 733f1683..b7fed635 100644 --- a/syntax/tsalt.vim +++ b/syntax/tsalt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tsalt.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tsalt.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tsscl.vim b/syntax/tsscl.vim index a20488be..33079116 100644 --- a/syntax/tsscl.vim +++ b/syntax/tsscl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tsscl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tsscl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tssgm.vim b/syntax/tssgm.vim index f96c71cb..69b10921 100644 --- a/syntax/tssgm.vim +++ b/syntax/tssgm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tssgm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tssgm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tssop.vim b/syntax/tssop.vim index 175a12eb..771c4181 100644 --- a/syntax/tssop.vim +++ b/syntax/tssop.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tssop.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tssop.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tt2.vim b/syntax/tt2.vim index 24cd9c66..5806a989 100644 --- a/syntax/tt2.vim +++ b/syntax/tt2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tt2.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tt2.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tt2html.vim b/syntax/tt2html.vim index 6ab61082..bc614e00 100644 --- a/syntax/tt2html.vim +++ b/syntax/tt2html.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/tt2html.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/tt2js.vim b/syntax/tt2js.vim index 77110ff9..43055612 100644 --- a/syntax/tt2js.vim +++ b/syntax/tt2js.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/tt2js.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/tt2js.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/twig.vim b/syntax/twig.vim index 73e3ace8..79768066 100644 --- a/syntax/twig.vim +++ b/syntax/twig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/twig.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/typescript.vim b/syntax/typescript.vim index e6a3e414..407a7b46 100644 --- a/syntax/typescript.vim +++ b/syntax/typescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/typescript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/typescriptreact.vim b/syntax/typescriptreact.vim index 1eca36b3..1adad053 100644 --- a/syntax/typescriptreact.vim +++ b/syntax/typescriptreact.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/typescriptreact.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/uc.vim b/syntax/uc.vim index 912e4e25..b820435b 100644 --- a/syntax/uc.vim +++ b/syntax/uc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/uc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/uc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/udevconf.vim b/syntax/udevconf.vim index 077cfe88..2d7a5f72 100644 --- a/syntax/udevconf.vim +++ b/syntax/udevconf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/udevconf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/udevperm.vim b/syntax/udevperm.vim index ee52607f..760d665f 100644 --- a/syntax/udevperm.vim +++ b/syntax/udevperm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/udevperm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/uil.vim b/syntax/uil.vim index 72569b54..cd46ea18 100644 --- a/syntax/uil.vim +++ b/syntax/uil.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/uil.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/uil.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/unison.vim b/syntax/unison.vim index 7774a64c..90ca9c49 100644 --- a/syntax/unison.vim +++ b/syntax/unison.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/unison.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/unison.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/updatedb.vim b/syntax/updatedb.vim index f1cb406b..b1a66d07 100644 --- a/syntax/updatedb.vim +++ b/syntax/updatedb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/updatedb.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/upstart.vim b/syntax/upstart.vim index ca1c1275..66f233e3 100644 --- a/syntax/upstart.vim +++ b/syntax/upstart.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/upstart.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/upstart.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/upstreamdat.vim b/syntax/upstreamdat.vim index 0f3b60a2..e05a0f8b 100644 --- a/syntax/upstreamdat.vim +++ b/syntax/upstreamdat.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/upstreamdat.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/upstreamdat.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/upstreaminstalllog.vim b/syntax/upstreaminstalllog.vim index 7e7cf248..3e75d109 100644 --- a/syntax/upstreaminstalllog.vim +++ b/syntax/upstreaminstalllog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/upstreaminstalllog.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/upstreaminstalllog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/upstreamlog.vim b/syntax/upstreamlog.vim index 0b0e9f26..b442718b 100644 --- a/syntax/upstreamlog.vim +++ b/syntax/upstreamlog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/upstreamlog.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/upstreamlog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/usserverlog.vim b/syntax/usserverlog.vim index 0711c54f..c651909e 100644 --- a/syntax/usserverlog.vim +++ b/syntax/usserverlog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/usserverlog.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/usserverlog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/usw2kagtlog.vim b/syntax/usw2kagtlog.vim index 53d2a08a..2467b8d9 100644 --- a/syntax/usw2kagtlog.vim +++ b/syntax/usw2kagtlog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/usw2kagtlog.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/usw2kagtlog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vala.vim b/syntax/vala.vim index 5854fdc9..c48851b3 100644 --- a/syntax/vala.vim +++ b/syntax/vala.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/vala.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vb.vim b/syntax/vb.vim index 86906666..9269f59e 100644 --- a/syntax/vb.vim +++ b/syntax/vb.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/vb.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vbnet.vim b/syntax/vbnet.vim index 695349cc..5a777649 100644 --- a/syntax/vbnet.vim +++ b/syntax/vbnet.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/vbnet.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/vbnet.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vcl.vim b/syntax/vcl.vim index 92bc17c3..03ff7ee8 100644 --- a/syntax/vcl.vim +++ b/syntax/vcl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/vcl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/vcl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/velocity.vim b/syntax/velocity.vim index bf855de6..65f37fd9 100644 --- a/syntax/velocity.vim +++ b/syntax/velocity.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/velocity.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/velocity.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vera.vim b/syntax/vera.vim index 4238909c..28ae65f3 100644 --- a/syntax/vera.vim +++ b/syntax/vera.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/vera.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/vera.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/verilog.vim b/syntax/verilog.vim index d7d27f79..92f8b68f 100644 --- a/syntax/verilog.vim +++ b/syntax/verilog.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/verilog.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/verilogams.vim b/syntax/verilogams.vim index 100ae92b..dd2c5994 100644 --- a/syntax/verilogams.vim +++ b/syntax/verilogams.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/verilogams.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/verilogams.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vgrindefs.vim b/syntax/vgrindefs.vim index a6f6e86a..42f72018 100644 --- a/syntax/vgrindefs.vim +++ b/syntax/vgrindefs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/vgrindefs.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/vgrindefs.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vhdl.vim b/syntax/vhdl.vim index 75771c6f..b5cbe9cd 100644 --- a/syntax/vhdl.vim +++ b/syntax/vhdl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/vhdl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vimgo.vim b/syntax/vimgo.vim index f0b6fe42..5066c4cf 100644 --- a/syntax/vimgo.vim +++ b/syntax/vimgo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/vimgo.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/vimgo.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/viminfo.vim b/syntax/viminfo.vim index 589398c4..1c992da1 100644 --- a/syntax/viminfo.vim +++ b/syntax/viminfo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/viminfo.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/viminfo.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vlang.vim b/syntax/vlang.vim index 12f5e276..b7b1ed4a 100644 --- a/syntax/vlang.vim +++ b/syntax/vlang.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/vlang.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vmasm.vim b/syntax/vmasm.vim index 034a4b19..4c3176c3 100644 --- a/syntax/vmasm.vim +++ b/syntax/vmasm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/vmasm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/vmasm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/voscm.vim b/syntax/voscm.vim index 24b43904..e7bd1257 100644 --- a/syntax/voscm.vim +++ b/syntax/voscm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/voscm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/voscm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vrml.vim b/syntax/vrml.vim index 02fca957..6f73ff54 100644 --- a/syntax/vrml.vim +++ b/syntax/vrml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/vrml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/vrml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vroom.vim b/syntax/vroom.vim index 00bf151f..9af1a992 100644 --- a/syntax/vroom.vim +++ b/syntax/vroom.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/vroom.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/vue.vim b/syntax/vue.vim index d516f409..26d6d3f4 100644 --- a/syntax/vue.vim +++ b/syntax/vue.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/vue.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/wast.vim b/syntax/wast.vim index d47d344d..e76ad62c 100644 --- a/syntax/wast.vim +++ b/syntax/wast.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/wast.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/webmacro.vim b/syntax/webmacro.vim index 3e9add54..e994d5d3 100644 --- a/syntax/webmacro.vim +++ b/syntax/webmacro.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/webmacro.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/webmacro.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/wget.vim b/syntax/wget.vim index e81980e0..25b03c80 100644 --- a/syntax/wget.vim +++ b/syntax/wget.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/wget.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/wget.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/winbatch.vim b/syntax/winbatch.vim index 3c7ad59b..82f717a9 100644 --- a/syntax/winbatch.vim +++ b/syntax/winbatch.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/winbatch.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/winbatch.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/wml.vim b/syntax/wml.vim index be4b620a..e5c8ca50 100644 --- a/syntax/wml.vim +++ b/syntax/wml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/wml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/wml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/wsh.vim b/syntax/wsh.vim index bd132b3c..019d9744 100644 --- a/syntax/wsh.vim +++ b/syntax/wsh.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/wsh.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/wsh.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/wsml.vim b/syntax/wsml.vim index ef8c3623..7f38e798 100644 --- a/syntax/wsml.vim +++ b/syntax/wsml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/wsml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/wsml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/wvdial.vim b/syntax/wvdial.vim index d9a47e26..71407cb4 100644 --- a/syntax/wvdial.vim +++ b/syntax/wvdial.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/wvdial.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/wvdial.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xdc.vim b/syntax/xdc.vim index 8a768440..8f06e618 100644 --- a/syntax/xdc.vim +++ b/syntax/xdc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/xdc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/xdc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xdefaults.vim b/syntax/xdefaults.vim index 78c7b8a8..a37e9a96 100644 --- a/syntax/xdefaults.vim +++ b/syntax/xdefaults.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/xdefaults.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xf86conf.vim b/syntax/xf86conf.vim index 90af49cb..168962a9 100644 --- a/syntax/xf86conf.vim +++ b/syntax/xf86conf.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/xf86conf.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xhtml.vim b/syntax/xhtml.vim index c58dc3c8..eceec40e 100644 --- a/syntax/xhtml.vim +++ b/syntax/xhtml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/xhtml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xinetd.vim b/syntax/xinetd.vim index c9ff0fc0..509f69eb 100644 --- a/syntax/xinetd.vim +++ b/syntax/xinetd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/xinetd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xmath.vim b/syntax/xmath.vim index 068a279b..24c59aa6 100644 --- a/syntax/xmath.vim +++ b/syntax/xmath.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/xmath.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/xmath.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xml.vim b/syntax/xml.vim index 724f3cc6..8491c7d7 100644 --- a/syntax/xml.vim +++ b/syntax/xml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/xml.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/xml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xmodmap.vim b/syntax/xmodmap.vim index 96fc0189..b63ab37e 100644 --- a/syntax/xmodmap.vim +++ b/syntax/xmodmap.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/xmodmap.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xpm.vim b/syntax/xpm.vim index 96289c11..e3f38b30 100644 --- a/syntax/xpm.vim +++ b/syntax/xpm.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/xpm.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/xpm.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xpm2.vim b/syntax/xpm2.vim index 333d8b62..d31a248f 100644 --- a/syntax/xpm2.vim +++ b/syntax/xpm2.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/xpm2.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/xpm2.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xquery.vim b/syntax/xquery.vim index b71b4c4e..607ea552 100644 --- a/syntax/xquery.vim +++ b/syntax/xquery.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/xquery.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/xquery.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xs.vim b/syntax/xs.vim index 80d559a5..cfeb65ca 100644 --- a/syntax/xs.vim +++ b/syntax/xs.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/xs.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xsd.vim b/syntax/xsd.vim index 325486cf..2ffc9cb9 100644 --- a/syntax/xsd.vim +++ b/syntax/xsd.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/xsd.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xsl.vim b/syntax/xsl.vim index 0a5d5cc8..23a1499b 100644 --- a/syntax/xsl.vim +++ b/syntax/xsl.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/xsl.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/xsl.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/xslt.vim b/syntax/xslt.vim index 2db1f3ea..e5976009 100644 --- a/syntax/xslt.vim +++ b/syntax/xslt.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/xslt.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yacc.vim b/syntax/yacc.vim index e687bb41..70c63a4b 100644 --- a/syntax/yacc.vim +++ b/syntax/yacc.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yacc.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yacc.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yaml.vim b/syntax/yaml.vim index a0fa5b9d..d40cdfca 100644 --- a/syntax/yaml.vim +++ b/syntax/yaml.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/yaml.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats.vim b/syntax/yats.vim index b3e95b05..4475692f 100644 --- a/syntax/yats.vim +++ b/syntax/yats.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/css.vim b/syntax/yats/css.vim index c4f3ae6e..043fe1ba 100644 --- a/syntax/yats/css.vim +++ b/syntax/yats/css.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/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, 'syntax/yats/css.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/dom-document.vim b/syntax/yats/dom-document.vim index 3d6d9762..2063c522 100644 --- a/syntax/yats/dom-document.vim +++ b/syntax/yats/dom-document.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/dom-document.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/dom-document.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/dom-elem.vim b/syntax/yats/dom-elem.vim index 32349a33..23317a8a 100644 --- a/syntax/yats/dom-elem.vim +++ b/syntax/yats/dom-elem.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/dom-elem.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/dom-elem.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/dom-event.vim b/syntax/yats/dom-event.vim index 698cd0e1..be08f14a 100644 --- a/syntax/yats/dom-event.vim +++ b/syntax/yats/dom-event.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/dom-event.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/dom-event.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/dom-form.vim b/syntax/yats/dom-form.vim index eecd8453..8982bdfe 100644 --- a/syntax/yats/dom-form.vim +++ b/syntax/yats/dom-form.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/dom-form.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/dom-form.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/dom-node.vim b/syntax/yats/dom-node.vim index 32e4142a..1367fa6b 100644 --- a/syntax/yats/dom-node.vim +++ b/syntax/yats/dom-node.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/dom-node.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/dom-node.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/dom-storage.vim b/syntax/yats/dom-storage.vim index c34ab017..198df139 100644 --- a/syntax/yats/dom-storage.vim +++ b/syntax/yats/dom-storage.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/dom-storage.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/dom-storage.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/ecma-402.vim b/syntax/yats/ecma-402.vim index 98c103c2..d7d15ed6 100644 --- a/syntax/yats/ecma-402.vim +++ b/syntax/yats/ecma-402.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/ecma-402.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/ecma-402.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-array.vim b/syntax/yats/es6-array.vim index 2b658f25..7b91b44a 100644 --- a/syntax/yats/es6-array.vim +++ b/syntax/yats/es6-array.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-array.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-array.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-date.vim b/syntax/yats/es6-date.vim index cd91fa53..706d82ef 100644 --- a/syntax/yats/es6-date.vim +++ b/syntax/yats/es6-date.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-date.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-date.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-function.vim b/syntax/yats/es6-function.vim index 14c137ae..8c08aa3c 100644 --- a/syntax/yats/es6-function.vim +++ b/syntax/yats/es6-function.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-function.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-function.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-json.vim b/syntax/yats/es6-json.vim index b01a878d..1950012d 100644 --- a/syntax/yats/es6-json.vim +++ b/syntax/yats/es6-json.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-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, 'syntax/yats/es6-json.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-map.vim b/syntax/yats/es6-map.vim index ec618928..589b0ee0 100644 --- a/syntax/yats/es6-map.vim +++ b/syntax/yats/es6-map.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-map.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-map.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-math.vim b/syntax/yats/es6-math.vim index fd86a190..188a9b9a 100644 --- a/syntax/yats/es6-math.vim +++ b/syntax/yats/es6-math.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-math.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-math.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-number.vim b/syntax/yats/es6-number.vim index a090e49b..f51e3c1e 100644 --- a/syntax/yats/es6-number.vim +++ b/syntax/yats/es6-number.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-number.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-number.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-object.vim b/syntax/yats/es6-object.vim index 55c6f943..1b2f9c33 100644 --- a/syntax/yats/es6-object.vim +++ b/syntax/yats/es6-object.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-object.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-object.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-promise.vim b/syntax/yats/es6-promise.vim index 6c1b4e8a..6068cf94 100644 --- a/syntax/yats/es6-promise.vim +++ b/syntax/yats/es6-promise.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-promise.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-promise.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-proxy.vim b/syntax/yats/es6-proxy.vim index 9451dbe5..1c6398ec 100644 --- a/syntax/yats/es6-proxy.vim +++ b/syntax/yats/es6-proxy.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-proxy.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-proxy.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-reflect.vim b/syntax/yats/es6-reflect.vim index 6e3de79e..6b3da9ff 100644 --- a/syntax/yats/es6-reflect.vim +++ b/syntax/yats/es6-reflect.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-reflect.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-reflect.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-regexp.vim b/syntax/yats/es6-regexp.vim index a6c50632..9a8d8725 100644 --- a/syntax/yats/es6-regexp.vim +++ b/syntax/yats/es6-regexp.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-regexp.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-regexp.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-set.vim b/syntax/yats/es6-set.vim index 024743bc..b116d4fb 100644 --- a/syntax/yats/es6-set.vim +++ b/syntax/yats/es6-set.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-set.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-set.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-string.vim b/syntax/yats/es6-string.vim index f4ef7f36..acb6d5a2 100644 --- a/syntax/yats/es6-string.vim +++ b/syntax/yats/es6-string.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-string.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-string.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/es6-symbol.vim b/syntax/yats/es6-symbol.vim index 2cfb65dd..b0c2cb04 100644 --- a/syntax/yats/es6-symbol.vim +++ b/syntax/yats/es6-symbol.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/es6-symbol.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/es6-symbol.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/event.vim b/syntax/yats/event.vim index 31d0eab2..4fb2ff6f 100644 --- a/syntax/yats/event.vim +++ b/syntax/yats/event.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/event.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/event.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/node.vim b/syntax/yats/node.vim index e8bc4b8b..98f859fd 100644 --- a/syntax/yats/node.vim +++ b/syntax/yats/node.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/node.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/node.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/test.vim b/syntax/yats/test.vim index a8fe7881..7044a06a 100644 --- a/syntax/yats/test.vim +++ b/syntax/yats/test.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/test.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/test.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/typescript.vim b/syntax/yats/typescript.vim index 9d91a1ce..82a33ae1 100644 --- a/syntax/yats/typescript.vim +++ b/syntax/yats/typescript.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/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, 'syntax/yats/typescript.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-blob.vim b/syntax/yats/web-blob.vim index fedb2417..7ec46b3a 100644 --- a/syntax/yats/web-blob.vim +++ b/syntax/yats/web-blob.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-blob.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-blob.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-console.vim b/syntax/yats/web-console.vim index d8b1ded4..ad032579 100644 --- a/syntax/yats/web-console.vim +++ b/syntax/yats/web-console.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-console.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-console.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-crypto.vim b/syntax/yats/web-crypto.vim index 91033242..f4647e26 100644 --- a/syntax/yats/web-crypto.vim +++ b/syntax/yats/web-crypto.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-crypto.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-crypto.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-encoding.vim b/syntax/yats/web-encoding.vim index 8188b7e1..1ba7a34c 100644 --- a/syntax/yats/web-encoding.vim +++ b/syntax/yats/web-encoding.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-encoding.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-encoding.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-fetch.vim b/syntax/yats/web-fetch.vim index 3c9019b6..370bc493 100644 --- a/syntax/yats/web-fetch.vim +++ b/syntax/yats/web-fetch.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-fetch.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-fetch.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-geo.vim b/syntax/yats/web-geo.vim index b9b3447d..0777b435 100644 --- a/syntax/yats/web-geo.vim +++ b/syntax/yats/web-geo.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-geo.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-geo.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-history.vim b/syntax/yats/web-history.vim index d170d37d..38001023 100644 --- a/syntax/yats/web-history.vim +++ b/syntax/yats/web-history.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-history.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-history.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-location.vim b/syntax/yats/web-location.vim index 0d92f7bd..bac99ca1 100644 --- a/syntax/yats/web-location.vim +++ b/syntax/yats/web-location.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-location.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-location.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-navigator.vim b/syntax/yats/web-navigator.vim index 2a408b0f..800f4296 100644 --- a/syntax/yats/web-navigator.vim +++ b/syntax/yats/web-navigator.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-navigator.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-navigator.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-network.vim b/syntax/yats/web-network.vim index 71cd6fca..88969b0b 100644 --- a/syntax/yats/web-network.vim +++ b/syntax/yats/web-network.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-network.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-network.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-payment.vim b/syntax/yats/web-payment.vim index 2154a14a..ee41c25c 100644 --- a/syntax/yats/web-payment.vim +++ b/syntax/yats/web-payment.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-payment.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-payment.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-service-worker.vim b/syntax/yats/web-service-worker.vim index 9f497472..9f58e8ea 100644 --- a/syntax/yats/web-service-worker.vim +++ b/syntax/yats/web-service-worker.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-service-worker.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-service-worker.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-window.vim b/syntax/yats/web-window.vim index 04d57e98..320aa37c 100644 --- a/syntax/yats/web-window.vim +++ b/syntax/yats/web-window.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-window.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-window.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web-xhr.vim b/syntax/yats/web-xhr.vim index e88b6456..8a29191c 100644 --- a/syntax/yats/web-xhr.vim +++ b/syntax/yats/web-xhr.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web-xhr.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web-xhr.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/yats/web.vim b/syntax/yats/web.vim index 4b4c1bdd..96050351 100644 --- a/syntax/yats/web.vim +++ b/syntax/yats/web.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/yats/web.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/yats/web.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/z8a.vim b/syntax/z8a.vim index fb4fa81e..856ed092 100644 --- a/syntax/z8a.vim +++ b/syntax/z8a.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/z8a.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/z8a.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/zephir.vim b/syntax/zephir.vim index a6fcd453..838b3cc9 100644 --- a/syntax/zephir.vim +++ b/syntax/zephir.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/zephir.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/zephir.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/zig.vim b/syntax/zig.vim index 380e4bae..f9d6fd5d 100644 --- a/syntax/zig.vim +++ b/syntax/zig.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/zig.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/zimbu.vim b/syntax/zimbu.vim index ed523e5d..e30c4496 100644 --- a/syntax/zimbu.vim +++ b/syntax/zimbu.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/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, 'syntax/zimbu.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/zir.vim b/syntax/zir.vim index ff3fc96d..be14a54b 100644 --- a/syntax/zir.vim +++ b/syntax/zir.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/zir.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/zir.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish diff --git a/syntax/zsh.vim b/syntax/zsh.vim index c8ccd47b..ac44ba26 100644 --- a/syntax/zsh.vim +++ b/syntax/zsh.vim @@ -1,4 +1,6 @@ -let files = filter(globpath(&rtp, 'syntax/zsh.vim', 1, 1), { _, v -> v !~ "vim-polyglot" && v !~ $VIMRUNTIME && v !~ "after" }) +let s:base = expand("<sfile>:h:h") +let Filter = { _, v -> stridx(v, s:base) == -1 && stridx(v, $VIMRUNTIME) == -1 && v !~ "after" } +let files = filter(globpath(&rtp, 'syntax/zsh.vim', 1, 1), Filter) if len(files) > 0 exec 'source ' . files[0] finish |