mirror of
https://github.com/amix/vimrc
synced 2025-06-17 19:35:00 +08:00
Updated plugins
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
"
|
||||
" ============================================================================
|
||||
command! -n=? -complete=dir -bar NERDTreeVCS :call <SID>CreateTabTreeVCS('<args>')
|
||||
command! -n=? -complete=dir -bar NERDTreeToggleVCS :call <SID>ToggleTabTreeVCS('<args>')
|
||||
|
||||
" FUNCTION: s:CreateTabTreeVCS(a:name) {{{1
|
||||
function! s:CreateTabTreeVCS(name)
|
||||
@ -19,6 +20,14 @@ function! s:CreateTabTreeVCS(name)
|
||||
call g:NERDTreeCreator.createTabTree(empty(l:path) ? "" : l:path._str())
|
||||
endfunction
|
||||
|
||||
" FUNCTION: s:ToggleTabTreeVCS(a:name) {{{1
|
||||
" Behaves the same as ToggleTabTree except roots directory at VCS root
|
||||
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())
|
||||
endfunction
|
||||
|
||||
" FUNCTION: s:FindParentVCSRoot(a:path) {{{1
|
||||
" Finds the root version control system folder of the given path. If a:path is
|
||||
" not part of a repository, return the original path.
|
||||
|
Reference in New Issue
Block a user