Browse Source

Add backport of fnameescape().

pull/130/head
Yoshiaki Kawazu 14 years ago
parent
commit
8afee6f266
1 changed files with 15 additions and 4 deletions
  1. +15
    -4
      autoload/vundle/config.vim

+ 15
- 4
autoload/vundle/config.vim View File

@ -71,19 +71,30 @@ func! s:rtp_add_a()
endf
func! s:rtp_rm(dir) abort
exec 'set rtp-='.fnameescape(expand(a:dir, 1))
exec 'set rtp-='.fnameescape(expand(a:dir.'/after', 1))
exec 'set rtp-='.s:fnameescape(expand(a:dir, 1))
exec 'set rtp-='.s:fnameescape(expand(a:dir.'/after', 1))
endf
func! s:rtp_add(dir) abort
exec 'set rtp^='.fnameescape(expand(a:dir, 1))
exec 'set rtp+='.fnameescape(expand(a:dir.'/after', 1))
exec 'set rtp^='.s:fnameescape(expand(a:dir, 1))
exec 'set rtp+='.s:fnameescape(expand(a:dir.'/after', 1))
endf
func! s:expand_path(path) abort
return simplify(expand(a:path, 1))
endf
" Backport of fnameescape().
function! s:fnameescape(string)
if exists('*fnameescape')
return fnameescape(a:string)
elseif a:string ==# '-'
return '\-'
else
return substitute(escape(a:string," \t\n*?[{`$\\%#'\"|!<"),'^[+>]','\\&','')
endif
endfunction
let s:bundle = {}
func! s:bundle.path()


Loading…
Cancel
Save