Around a year ago I wrote a brief post on how to replace the NERDTree plugin for Vim with a couple of settings for netrw and some custom scripting. I dug around in the documentation and found a couple of built-in settings for netrw that made it look and feel relatively close to NERDTree.
First, let’s set netrw to use a tree style listing of our directories:
Then we’ll make it open the file in the previous window to the right of the project drawer:
We can also set the width of the window. The value is set in percent of the total window width:
Also if you’re like me and find the banner with information at the top highly annoying, you can easily disable it:
If you’ve set custom wildignores netrw can inherit them by doing this:
If you want it to launch right after you’ve entered Vim you could map it to the
…and we’re done!