安装Nerdtree时出现问题

时间:2012-08-15 21:22:09

标签: ruby-on-rails macvim nerdtree pathogen

根据nerdtree安装说明,我需要安装pathogen.vim来安装nerdtree。要安装pathogen.vim,我按照病原体安装说明操作,我这样做了:

~$ mkdir -p ~/.vim/autoload ~/.vim/bundle; \
> curl -so ~/.vim/autoload/pathogen.vim \
> <link to github>

这创造了pathogen.vim:

~/.vim/autoload$ ls

pathogen.vim  … … …

然后我按照病原体安装说明进行操作:

Add this to your vimrc:

call pathogen#infect()

==

~$ cat .vimrc
…
…
"For pathogen(a vim installer):
call pathogen#infect()

然后按照nerdtree安装说明进行操作:

pathogen.vim is the recommended way to install nerdtree.

cd ~/.vim/bundle
git clone <link to github>

Then reload vim, run :helptags, and check out :help NERD_tree.txt. 

我试着像这样安装nerdtree:

~/.vim/bundle$ git clone <link to github>
Cloning into 'nerdtree'...
remote: Counting objects: 2426, done.
remote: Compressing objects: 100% (801/801), done.
remote: Total 2426 (delta 1091), reused 2354 (delta 1025)
Receiving objects: 100% (2426/2426), 912.52 KiB | 573 KiB/s, done.
Resolving deltas: 100% (1091/1091), done.
$

哪个产生了:

~/.vim$ cd bundle
~/.vim/bundle$ ls
nerdtree

但我无法让nerdtree工作。当我尝试这个时:

~$ cd rails_projects/demo_app22/
~/rails_projects/demo_app22$ mvim .
~/rails_projects/demo_app22$ 

...然后这个:

:NERDtree

我收到错误:

E492: Not an editor command: NERDtree

当我尝试:helptags时,我收到错误:

E472: Argument required

1 个答案:

答案 0 :(得分:0)

查看此脚本,为Vim for Rails配备:http://www.vim.org/scripts/script.php?script_id=1567