diff options
Diffstat (limited to 'compiler')
38 files changed, 114 insertions, 38 deletions
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 |