How to autocomplete in CtrlP search bar?

600 Views Asked by At

If I want to create a new file config/initializers/NEW_FILE.rb under CTRLP,

I need to type the full path, how could I use the fuzzy search function to auto-complete the config/initializers/ in the typing area.

That is, I can type cfg/ini_ then I can type some key to auto complete config/initializers/

enter image description here

2

There are 2 best solutions below

0
On

CtrlP will autocomplete the current path segment when you hit the <Tab> key.

1
On

I know you didn't ask for that but you could do the following without CtrlP:

:e co*/in*<Tab>NEW_FILE.rb<CR>

You'll need longest in the values of wildmode, though:

set wildmode=longest