1

Is it possible to use Ctrl-P to search for directories in addition to searching for files? I want to be able to search for directories in my project in whatever mode (CtrlP, CtrlPMRU, or other) and when I select a directory from the options I want a netrw view of the directory to open in the window.

For example if my project structure is:

src
├── foo
│   └── foo.py
├── bar
│   └── bar.py

and I open Ctrl-P in CtrlP mode I want the options to be:

src/
src/foo/
src/foo/foo.py
src/bar/
src/bar/bar.py

and then if I selected src/foo/, I would want a netrw view of src/foo/, i.e. showing something like:

../
./
foo.py
  • @D.BenKnoble sorry question was not very clear, just rewrote to be more specific – lsimmons Nov 18 '19 at 23:21
0

I don't think it is possible to do what you are asking for because it means mixing to opposite concepts: CtrlP is a fuzzy finder and usually people use it to find files without having to worry about navigating in a netrw like view.

Maybe you could have a look at :h :CtrlPDir which could help you searching files only in a specific directory.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.