mirror of
https://github.com/amix/vimrc
synced 2025-07-07 00:15:00 +08:00
Updated plugins
This commit is contained in:
@ -17,7 +17,7 @@ command! -n=? -complete=dir -bar NERDTreeToggleVCS :call <SID>ToggleTabTreeVCS('
|
||||
function! s:CreateTabTreeVCS(name)
|
||||
let l:path = g:NERDTreeCreator._pathForString(a:name)
|
||||
let l:path = s:FindParentVCSRoot(l:path)
|
||||
call g:NERDTreeCreator.createTabTree(empty(l:path) ? "" : l:path._str())
|
||||
call g:NERDTreeCreator.createTabTree(empty(l:path) ? '' : l:path._str())
|
||||
endfunction
|
||||
|
||||
" FUNCTION: s:ToggleTabTreeVCS(a:name) {{{1
|
||||
@ -25,7 +25,7 @@ endfunction
|
||||
function! s:ToggleTabTreeVCS(name)
|
||||
let l:path = g:NERDTreeCreator._pathForString(a:name)
|
||||
let l:path = s:FindParentVCSRoot(l:path)
|
||||
call g:NERDTreeCreator.toggleTabTree(empty(l:path) ? "" : l:path._str())
|
||||
call g:NERDTreeCreator.toggleTabTree(empty(l:path) ? '' : l:path._str())
|
||||
endfunction
|
||||
|
||||
" FUNCTION: s:FindParentVCSRoot(a:path) {{{1
|
||||
@ -34,7 +34,7 @@ endfunction
|
||||
function! s:FindParentVCSRoot(path)
|
||||
let l:path = a:path
|
||||
while !empty(l:path) &&
|
||||
\ l:path._str() !~ '^\(\a:\\\|\/\)$' &&
|
||||
\ l:path._str() !~# '^\(\a:\\\|\/\)$' &&
|
||||
\ !isdirectory(l:path._str() . '/.git') &&
|
||||
\ !isdirectory(l:path._str() . '/.svn') &&
|
||||
\ !isdirectory(l:path._str() . '/.hg') &&
|
||||
@ -42,6 +42,6 @@ function! s:FindParentVCSRoot(path)
|
||||
\ !isdirectory(l:path._str() . '/_darcs')
|
||||
let l:path = l:path.getParent()
|
||||
endwhile
|
||||
return (empty(l:path) || l:path._str() =~ '^\(\a:\\\|\/\)$') ? a:path : l:path
|
||||
return (empty(l:path) || l:path._str() =~# '^\(\a:\\\|\/\)$') ? a:path : l:path
|
||||
endfunction
|
||||
|
||||
|
Reference in New Issue
Block a user