NERDTree автоматически загружает определенный каталог - PullRequest
9 голосов
/ 27 апреля 2011

Я использую gvim в windows. По умолчанию nerdtree загружает диск C: \ по умолчанию. Мне нравится менять его на E: \ drive. Как этого добиться?используя команду: NERDTree, я получаю эту ошибку E492: Not an editor command: NERDTree

Ответы [ 2 ]

19 голосов
/ 27 апреля 2011

В моем файле vimrc есть следующий код

cd ~/documents
map <F2> :NERDTreeToggle<CR>
" open Nerd Tree in folder of file in active buffer
map <Leader>nt :NERDTree %:p:h<CR>

Команда cd не относится к NerdTree.Он просто меняет рабочий каталог, когда Vim начинает что-то, что для меня разумно.

4 голосов
/ 26 сентября 2014

Из справочного файла NERDTree: :NERDTree [<start-directory> | <bookmark>] *:NERDTree* Opens a fresh NERD tree. The root of the tree depends on the argument given. There are 3 cases: If no argument is given, the current directory will be used. If a directory is given, that will be used. If a bookmark name is given, the corresponding directory will be used. For example: > :NERDTree /home/marty/vim7/src :NERDTree foo (foo is the name of a bookmark)

...