26

I'm starting to use Vim and I chose Vundle instead of Pathogen.

I would like to know if I can install the NERDTree using Vundle.

I'm starting Vim and searching for NERDTree like this:

:BundleSearch NERDTree

But it is not finding the plugin, only:

"Keymap: i - Install plugin; c - Cleanup; s - Se|
arch; R - Reload list                           |~                                               
"Search results for: NERDTree                   |~                                               
Plugin 'nerdtree-ack'                           |~                                               
Plugin 'FindInNERDTree'  
  • 1
    As a new user, you shouldn't install any plugin. Get used to vanilla Vim first then look for solutions to your problems as you encounter them. some of those solutions will be plugins but some others won't. Case in point: Vim already comes with a file explorer so you don't need to install another one… and you don't need a plugin manager either. – romainl Nov 3 '15 at 6:33
  • Be careful installing plugins too early in your Vim journey. General advice: Learning Vim after vimtutor – Peter Rincker Nov 3 '15 at 21:40
31

Below is the empty Vundle config.

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

Now if you want to add a new plugin example nerdtree

you just add the line

Plugin 'scrooloose/nerdtree'

now the vimrc will look like this

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

Now, just save the vimrc and restart vim so it can source the new vimrc then issue the :PluginInstall command:

:PluginInstall

more information on using can be found here

  • Rather than restarting, consider just running the command source ~/.vimrc. – cirrusio May 23 '18 at 19:29
  • I also followed above steps and it works now. – saitgulmez Jul 25 at 1:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.