Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
let g:netrw_keepdir=0NERDTree可以做吗?
let g:netrw_keepdir=0
当我更改目录时,我想在那里创建一个新文件。
那么如何将其设置为当前目录?
是否要将刚刚通过 NERDTree 输入的目录设为cwd?
cwd
如果是这样,您可以查看 NERDTree 的文档 ( :help nerdtree) 并了解其中的内容NERDTreeChDirMode。
:help nerdtree
NERDTreeChDirMode
如果您想将此行为设为默认行为(无论您如何打开/创建文件),将以下行添加到您的 .vimrc 中,会将工作目录更改为包含活动缓冲区的目录。
set autochdir