mirror of
https://github.com/preservim/nerdtree.git
synced 2025-11-08 11:23:48 -05:00
Support tab-specific CWDs (#1032)
* Change CWD when switching tabs to the tab's NERDTree root. * Remove commented-out code. * List the new possible value for NERDTreeChDirMode in doc. * Add new option to select between `:cd` and `:tcd`. * Document the new NERDTreeUseTCD option. * Update version number in change log.
This commit is contained in:
@@ -48,6 +48,7 @@ call s:initVariable("g:NERDTreeAutoCenterThreshold", 3)
|
||||
call s:initVariable("g:NERDTreeCaseSensitiveSort", 0)
|
||||
call s:initVariable("g:NERDTreeNaturalSort", 0)
|
||||
call s:initVariable("g:NERDTreeSortHiddenFirst", 1)
|
||||
call s:initVariable("g:NERDTreeUseTCD", 0)
|
||||
call s:initVariable("g:NERDTreeChDirMode", 0)
|
||||
call s:initVariable("g:NERDTreeCreatePrefix", "silent")
|
||||
call s:initVariable("g:NERDTreeMinimalUI", 0)
|
||||
@@ -183,6 +184,12 @@ if g:NERDTreeHijackNetrw
|
||||
augroup END
|
||||
endif
|
||||
|
||||
if g:NERDTreeChDirMode == 3
|
||||
augroup NERDTreeChDirOnTabSwitch
|
||||
autocmd TabEnter * if g:NERDTree.ExistsForTab()|call g:NERDTree.ForCurrentTab().getRoot().path.changeToDir()|endif
|
||||
augroup END
|
||||
endif
|
||||
|
||||
" SECTION: Public API {{{1
|
||||
"============================================================
|
||||
function! NERDTreeAddMenuItem(options)
|
||||
|
||||
Reference in New Issue
Block a user