2011-04-27 3 views
7

windows에서 gvim을 사용하고 있습니다. 기본 nerdtree는 C : \ 드라이브를 기본값으로로드합니다.이 파일을 E : \ 드라이브로 변경하고 싶습니다. 어떻게 하시겠습니까? 내가 사용 NERDTree를 시작하려고 할 때마다NERDTree 특정 디렉토리를 자동으로로드

는 : NERDTree 명령을,이 오류를 E492: Not an editor command: NERDTree

답변

14

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이 나에게 의미있는 일을 시작할 때 작업 디렉토리를 변경한다. NERDTree 도움말 파일에서

3

: :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)