vim Plugins NERD Tree


NERD TREE is a plugin by scrooloose that allows you to explore the file system while using vim. You can open files and directories via a tree system that you can manipulate with the keyboard or the mouse.

Add this to your .vimrc to start NERDTree automatically when vim starts up:

autocmd vimenter * NERDTree

To automatically close NERDTree if it's the only window left add this to your .vimrc:

autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

It's recommended to map a key combination to the NERDTreeToggle command. Add this to your .vimrc (this example uses Ctrl + N)

map <C-n> :NERDTreeToggle<CR>

Full details and installation instructions can be view on their Github.