From f12a65f32f67d42064f0db7a68c04b9d2b85b648 Mon Sep 17 00:00:00 2001 From: Tony Duckles Date: Sat, 29 Dec 2012 14:42:39 -0600 Subject: [PATCH] pathogen.vim: Update c9fb89d..1b46b4f (https://github.com/tpope/vim-pathogen) --- .vim/autoload/pathogen.vim | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/.vim/autoload/pathogen.vim b/.vim/autoload/pathogen.vim index 3accbe6..530ec7e 100644 --- a/.vim/autoload/pathogen.vim +++ b/.vim/autoload/pathogen.vim @@ -5,8 +5,8 @@ " Install in ~/.vim/autoload (or ~\vimfiles\autoload). " " For management of individually installed plugins in ~/.vim/bundle (or -" ~\vimfiles\bundle), adding `call pathogen#infect()` to your .vimrc -" prior to `filetype plugin indent on` is the only other setup necessary. +" ~\vimfiles\bundle), adding `call pathogen#infect()` to the top of your +" .vimrc is the only other setup necessary. " " The API is documented inline below. For maximum ease of reading, " :set foldmethod=marker @@ -177,7 +177,12 @@ command! -bar Helptags :call pathogen#helptags() " Like findfile(), but hardcoded to use the runtimepath. function! pathogen#runtime_findfile(file,count) "{{{1 let rtp = pathogen#join(1,pathogen#split(&rtp)) - return fnamemodify(findfile(a:file,rtp,a:count),':p') + let file = findfile(a:file,rtp,a:count) + if file ==# '' + return '' + else + return fnamemodify(file,':p') + endif endfunction " }}}1 " Backport of fnameescape(). @@ -191,6 +196,10 @@ function! pathogen#fnameescape(string) " {{{1 endif endfunction " }}}1 +if exists(':Vedit') + finish +endif + function! s:find(count,cmd,file,lcd) " {{{1 let rtp = pathogen#join(1,pathogen#split(&runtimepath)) let file = pathogen#runtime_findfile(a:file,a:count) @@ -219,7 +228,7 @@ function! s:Findcomplete(A,L,P) " {{{1 else let request = a:A endif - let pattern = substitute(request,'\'.sep,'*'.sep,'g').'*' + let pattern = substitute(request,'/\|\'.sep,'*'.sep,'g').'*' let found = {} for path in pathogen#split(&runtimepath) let path = expand(path, ':p') @@ -242,4 +251,4 @@ command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vtabed command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vpedit :execute s:find(,'pedit',,1) command! -bar -bang -range=1 -nargs=1 -complete=customlist,s:Findcomplete Vread :execute s:find(,'read',,1) -" vim:set ft=vim ts=8 sw=2 sts=2: +" vim:set et sw=2: -- 2.47.1