diff options
Diffstat (limited to 'extras')
-rw-r--r-- | extras/flow.vim | 4 | ||||
-rw-r--r-- | extras/jsdoc.vim | 4 | ||||
-rw-r--r-- | extras/ngdoc.vim | 4 |
3 files changed, 9 insertions, 3 deletions
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 |