我开始使用Vim,选择了Vundle而不是Pathogen。

我想知道是否可以使用Vundle安装NERDTree。

我正在启动Vim并搜索NERDTree,如下所示: >

评论

作为新用户,您不应安装任何插件。首先适应香草Vim,然后在遇到问题时寻找解决方案。其中一些解决方案将是插件,而其他解决方案则不会。恰当的例子:Vim已经附带了一个文件浏览器,因此您不需要安装其他文件浏览器……也不需要插件管理器。

在您的Vim旅程中,请过早安装插件。一般建议:在vimtutor之后学习Vim

#1 楼

下面是空的Vundle配置。

set nocompatible 
filetype off

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'

" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required


现在,如果要添加新的插件示例
nerdtree

,只需添加这行代码

Plugin 'scrooloose/nerdtree'

现在,vimrc将如下所示

set nocompatible 
filetype off

" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" added nerdtree
Plugin 'scrooloose/nerdtree'
" All of your Plugins must be added before the following line
call vundle#end()            " required
filetype plugin indent on    " required


现在,只需保存vimrc重新启动vim,以便可以获取新的vimrc,然后发出:PluginInstall命令:

:PluginInstall


有关使用的更多信息,请参见此处

评论


与其重新启动,不如考虑仅运行命令源〜/ .vimrc。

– cirrusio
18年5月23日在19:29

我也按照上述步骤操作,现在可以正常工作。

–saitgulmez
19年7月25日,1:12