mirror of
https://github.com/preservim/nerdtree.git
synced 2024-10-18 22:00:21 +03:00
Make it possible to set the command to cd
Signed-off-by: Jo De Boeck <deboeck.jo@gmail.com>
This commit is contained in:
parent
b6e3c0db30
commit
f5b04ba032
@ -630,6 +630,9 @@ NERD tree. These options should be set in your vimrc.
|
||||
at the beginning of the hidden file names
|
||||
into account when sorting nodes.
|
||||
|
||||
|'NERDTreeChDirCWD'| Tells the NERD tree which command to use to
|
||||
change dir.
|
||||
|
||||
|'NERDTreeChDirMode'| Tells the NERD tree if/when it should change
|
||||
vim's current working directory.
|
||||
|
||||
@ -776,6 +779,17 @@ above nodes would then be sorted like this: >
|
||||
z100.txt
|
||||
z110.txt
|
||||
<
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'NERDTreeChDirCMD'*
|
||||
Values: cd, lcd or tcd.
|
||||
Default: cd.
|
||||
|
||||
Use this option to change the way NERDTree changes directory.
|
||||
Use cd to change vim's global directoy.
|
||||
Use lcd to change the directory for the curent window.
|
||||
Use tcd (neovim only) to change the directory for the current tab.
|
||||
|
||||
------------------------------------------------------------------------------
|
||||
*'NERDTreeChDirMode'*
|
||||
|
||||
|
@ -74,7 +74,7 @@ function! s:Path.changeToDir()
|
||||
endif
|
||||
|
||||
try
|
||||
execute "cd " . dir
|
||||
execute g:NERDTreeChDirCMD . dir
|
||||
call nerdtree#echo("CWD is now: " . getcwd())
|
||||
catch
|
||||
throw "NERDTree.PathChangeError: cannot change CWD to " . dir
|
||||
|
@ -49,6 +49,7 @@ call s:initVariable("g:NERDTreeCaseSensitiveSort", 0)
|
||||
call s:initVariable("g:NERDTreeNaturalSort", 0)
|
||||
call s:initVariable("g:NERDTreeSortHiddenFirst", 1)
|
||||
call s:initVariable("g:NERDTreeChDirMode", 0)
|
||||
call s:initVariable("g:NERDTreeChDirCMD", "cd")
|
||||
call s:initVariable("g:NERDTreeCreatePrefix", "silent")
|
||||
call s:initVariable("g:NERDTreeMinimalUI", 0)
|
||||
if !exists("g:NERDTreeIgnore")
|
||||
|
Loading…
Reference in New Issue
Block a user