Add NERDTreeRefreshRoot command (#897)
* Add NERDTreeRefreshRoot command * Document NERDTreeRefreshRoot
This commit is contained in:
parent
6b6cadf86c
commit
5381197747
@ -524,10 +524,17 @@ endfunction
|
|||||||
" Reloads the current root. All nodes below this will be lost and the root dir
|
" Reloads the current root. All nodes below this will be lost and the root dir
|
||||||
" will be reloaded.
|
" will be reloaded.
|
||||||
function! s:refreshRoot()
|
function! s:refreshRoot()
|
||||||
|
if !g:NERDTree.IsOpen()
|
||||||
|
return
|
||||||
|
endif
|
||||||
call nerdtree#echo("Refreshing the root node. This could take a while...")
|
call nerdtree#echo("Refreshing the root node. This could take a while...")
|
||||||
|
|
||||||
|
let l:curWin = winnr()
|
||||||
|
call nerdtree#exec(g:NERDTree.GetWinNum() . "wincmd w")
|
||||||
call b:NERDTree.root.refresh()
|
call b:NERDTree.root.refresh()
|
||||||
call b:NERDTree.render()
|
call b:NERDTree.render()
|
||||||
redraw
|
redraw
|
||||||
|
call nerdtree#exec(l:curWin . "wincmd w")
|
||||||
call nerdtree#echo("Refreshing the root node. This could take a while... DONE")
|
call nerdtree#echo("Refreshing the root node. This could take a while... DONE")
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
@ -554,6 +561,7 @@ function! nerdtree#ui_glue#setupCommands()
|
|||||||
command! -n=1 -complete=customlist,nerdtree#completeBookmarks -bar NERDTreeFromBookmark call g:NERDTreeCreator.CreateTabTree('<args>')
|
command! -n=1 -complete=customlist,nerdtree#completeBookmarks -bar NERDTreeFromBookmark call g:NERDTreeCreator.CreateTabTree('<args>')
|
||||||
command! -n=0 -bar NERDTreeMirror call g:NERDTreeCreator.CreateMirror()
|
command! -n=0 -bar NERDTreeMirror call g:NERDTreeCreator.CreateMirror()
|
||||||
command! -n=? -complete=file -bar NERDTreeFind call s:findAndRevealPath('<args>')
|
command! -n=? -complete=file -bar NERDTreeFind call s:findAndRevealPath('<args>')
|
||||||
|
command! -n=0 -bar NERDTreeRefreshRoot call s:refreshRoot()
|
||||||
command! -n=0 -bar NERDTreeFocus call NERDTreeFocus()
|
command! -n=0 -bar NERDTreeFocus call NERDTreeFocus()
|
||||||
command! -n=0 -bar NERDTreeCWD call NERDTreeCWD()
|
command! -n=0 -bar NERDTreeCWD call NERDTreeCWD()
|
||||||
endfunction
|
endfunction
|
||||||
|
@ -145,6 +145,9 @@ The following features and functionality are provided by the NERD tree:
|
|||||||
Change the NERDTree root to the current working directory. If no
|
Change the NERDTree root to the current working directory. If no
|
||||||
NERDTree exists for this tab, a new one is opened.
|
NERDTree exists for this tab, a new one is opened.
|
||||||
|
|
||||||
|
:NERDTreeRefreshRoot *:NERDTreeRefreshRoot*
|
||||||
|
Refreshes the NERD tree root node.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
2.2. Bookmarks *NERDTreeBookmarks*
|
2.2. Bookmarks *NERDTreeBookmarks*
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user