mirror of
https://github.com/amix/vimrc
synced 2025-06-16 17:45:00 +08:00
Updated all plugins that are non-forked. Added some new plugins.
Added update_plugins.py which can fetch new plugins from GitHub. New plugins added: zencoding, vim-indent-object, taglist, nginx.vim
This commit is contained in:
@ -8,25 +8,28 @@
|
||||
fu! ctrlp#utils#lash()
|
||||
retu &ssl || !exists('+ssl') ? '/' : '\'
|
||||
endf
|
||||
let s:lash = ctrlp#utils#lash()
|
||||
|
||||
fu! s:lash(...)
|
||||
retu ( a:0 ? a:1 : getcwd() ) !~ '[\/]$' ? s:lash : ''
|
||||
endf
|
||||
|
||||
fu! ctrlp#utils#opts()
|
||||
let usrhome = $HOME.s:lash($HOME)
|
||||
let s:lash = ctrlp#utils#lash()
|
||||
let usrhome = $HOME . s:lash( $HOME )
|
||||
let cahome = exists('$XDG_CACHE_HOME') ? $XDG_CACHE_HOME : usrhome.'.cache'
|
||||
let s:cache_dir = isdirectory(usrhome.'.ctrlp_cache')
|
||||
let cadir = isdirectory(usrhome.'.ctrlp_cache')
|
||||
\ ? usrhome.'.ctrlp_cache' : cahome.s:lash(cahome).'ctrlp'
|
||||
if exists('g:ctrlp_cache_dir')
|
||||
let s:cache_dir = expand(g:ctrlp_cache_dir, 1)
|
||||
if isdirectory(s:cache_dir.s:lash(s:cache_dir).'.ctrlp_cache')
|
||||
let s:cache_dir = s:cache_dir.s:lash(s:cache_dir).'.ctrlp_cache'
|
||||
let cadir = expand(g:ctrlp_cache_dir, 1)
|
||||
if isdirectory(cadir.s:lash(cadir).'.ctrlp_cache')
|
||||
let cadir = cadir.s:lash(cadir).'.ctrlp_cache'
|
||||
en
|
||||
en
|
||||
let s:cache_dir = cadir
|
||||
endf
|
||||
cal ctrlp#utils#opts()
|
||||
|
||||
let s:wig_cond = v:version > 702 || ( v:version == 702 && has('patch051') )
|
||||
" Files and Directories {{{1
|
||||
fu! ctrlp#utils#cachedir()
|
||||
retu s:cache_dir
|
||||
@ -64,8 +67,43 @@ fu! ctrlp#utils#writecache(lines, ...)
|
||||
endf
|
||||
|
||||
fu! ctrlp#utils#glob(...)
|
||||
let cond = v:version > 702 || ( v:version == 702 && has('patch051') )
|
||||
retu call('glob', cond ? a:000 : [a:1])
|
||||
let path = ctrlp#utils#fnesc(a:1, 'g')
|
||||
retu s:wig_cond ? glob(path, a:2) : glob(path)
|
||||
endf
|
||||
|
||||
fu! ctrlp#utils#globpath(...)
|
||||
retu call('globpath', s:wig_cond ? a:000 : a:000[:1])
|
||||
endf
|
||||
|
||||
fu! ctrlp#utils#fnesc(path, type, ...)
|
||||
if exists('*fnameescape')
|
||||
if exists('+ssl')
|
||||
if a:type == 'c'
|
||||
let path = escape(a:path, '%#')
|
||||
elsei a:type == 'f'
|
||||
let path = fnameescape(a:path)
|
||||
elsei a:type == 'g'
|
||||
let path = escape(a:path, '?*')
|
||||
en
|
||||
let path = substitute(path, '[', '[[]', 'g')
|
||||
el
|
||||
let path = fnameescape(a:path)
|
||||
en
|
||||
el
|
||||
if exists('+ssl')
|
||||
if a:type == 'c'
|
||||
let path = escape(a:path, '%#')
|
||||
elsei a:type == 'f'
|
||||
let path = escape(a:path, " \t\n%#*?|<\"")
|
||||
elsei a:type == 'g'
|
||||
let path = escape(a:path, '?*')
|
||||
en
|
||||
let path = substitute(path, '[', '[[]', 'g')
|
||||
el
|
||||
let path = escape(a:path, " \t\n*?[{`$\\%#'\"|!<")
|
||||
en
|
||||
en
|
||||
retu a:0 ? escape(path, a:1) : path
|
||||
endf
|
||||
"}}}
|
||||
|
||||
|
Reference in New Issue
Block a user