When browsing the interwebs, I found that many people use a cool plugin called nerdtree to navigate between files quicker. I started to try to install the plugin for vim and for me, it was difficult. I’m running Ubuntu 12.04 and am relatively new to vim. So I’m going to share the process I went through to get it up and running.
I’ve found that if you install a vim plugin called pathogen, that it makes installing other plugins a lot easier.
First, you need to create the environment for pathogen by entering these commands into your terminal:
mkdir -p ~/.vim/autoload ~/.vim/bundle;
curl -Sso ~/.vim/autoload/pathogen.vim https://raw.github.com/tpope/vim-pathogen/master/autoload/pathogen.vim
If that didn’t work for you, you will need to install curl by entering this into your terminal:
sudo apt-get install curl
if you are new to vim and do not have a .vimrc file, create one with vim:
and paste the following lines to the end of your .vimrc file:
call pathogen#helptags() ” generate helptags for everything in ‘runtimepath’
filetype plugin indent on
Now we’re ready to install nerdtree. (or any other vim plugin for that matter)
You can easily download and install nerdtree using this command:
git clone https://github.com/scrooloose/nerdtree.git
Next, start a vim session and type
To toggle the directory listing between visible and hidden states use