0

根据 nerdtree 安装说明,我需要安装 Pathogen.vim 来安装 nerdtree。为了安装pathogen.vim,我遵循了pathogen install instructions,我这样做了:

~$ 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
4

1 回答 1

0

查看这个脚本来装饰 Vim for Rails:http ://www.vim.org/scripts/script.php?script_id=1567

于 2012-08-15T22:07:09.663 回答