Question

I have been using Vim's file explorer plugin so that I can easily view files in my directory and open them by double clicking. This worked fine when I had all of my .h and .cpp in the same directory. But now I separated them. My .cpp files are in a src/ directory and my .h are in an include/ directory. So when I open Vim, the file explorer will only show one directory and I can't access both .h and .cpp. How can I make it show files from both directories? Any help is appreciated.

Was it helpful?

Solution

You can use tree style for netrw plugin. It will allow you to browse all subdirs of your project's dir.

To switch to it you can press "i" until it shows your directory as a tree (with a branch on the left). To make it permanent, you can add

let g:netrw_liststyle= 3

to your .vimrc file.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top