nerdtree 自动切换到当前目录

警告
本文最后更新于 2022-09-13,文中内容可能已过时。
1
2
3
set autochdir
let NERDTreeChDirMode=2
nnoremap <leader>n :NERDTree .<CR>

so that NERDTree always opens in the current folder.

  • With the 1st line, the working directory is always the one where the active buffer is located.
  • With the 2nd line, I make sure the working directory is set correctly.
  • With the 3rd line, I hit <leader>n to open NERDTree.

相关内容

william 支付宝支付宝
william 微信微信
0%