Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Alternative to NERDTree in Vim [closed]

Tags:

vim

nerdtree

I used to use NERDTree quite happily but found it causes problems when using the YouCompleteMe plugin (which is much more useful). In the mean time I have been using Ctrl-P which is a useful plugin in itself but I'm missing the overview of my projects that NERFTree gave me.

Can anyone suggest an alternative that does roughly the same thing and hopefully without the problems associated with NERDTree?

like image 398
Cromulent Avatar asked Aug 17 '13 10:08

Cromulent


1 Answers

If you're using a fuzzing plugin to open buffers most of the time, and use NERDTree only to explore larger directory hierarchies, you might want to learn about Vim's built-in netrw interface: :help netrw.

Options that I found particulary useful were:

let g:netrw_banner       = 0
let g:netrw_keepdir      = 0
let g:netrw_liststyle    = 1 " or 3
let g:netrw_sort_options = 'i'

And maybe a way to run it on Vim startup:

1) Open it at startup if no argument was specified ($ vim):

autocmd VimEnter * if !argc() | Explore | endif

2) Open it only when the specified argument is a directory ($ vim /tmp):

autocmd VimEnter * if isdirectory(expand('<afile>')) | Explore | endif

HTH

like image 160
mhinz Avatar answered Nov 05 '22 03:11

mhinz