diff --git a/autoload/pathogen.vim b/autoload/pathogen.vim index 12b6b5b..91e1cb0 100644 --- a/autoload/pathogen.vim +++ b/autoload/pathogen.vim @@ -30,7 +30,11 @@ function! pathogen#infect(...) abort call add(paths, 'pack/{}/start/{}') endif endif - for path in paths + let static = '^\%([$~\\/]\|\w:[\\/]\)[^{}*]*[\/]$' + for path in filter(copy(paths), 'v:val =~# static') + call pathogen#surround(path) + endfor + for path in filter(copy(paths), 'v:val !~# static') if path =~# '^\%({\=[$~\\/]\|{\=\w:[\\/]\).*\%([{}*]\|[\\/]$\)' call pathogen#surround(path) elseif path =~# '^\%([$~\\/]\|\w:[\\/]\)'