Feature: Call CtrlP with search populated #387

jgallen23 opened this Issue Mar 28, 2013 · 3 comments

3 participants


Not sure if this can already be done, but I couldn't find it in the docs. I'm looking to do something like :CtrlP *profile* and have ctrl p show me all filenames that contain profile

edited to be more clear


@jgallen23 you need to use the tag or buffertag extension for ctrlp, it will search files for the word


I actually only want the files with profile in the name of the file (like how ctrlp works currently). I just want to be able to programmatically invoke a search. Sorry for the confusion.


There's the g:ctrlp_default_input option with which you can create a command like this:

com! -n=? CtrlPDefInput let g:ctrlp_default_input = <q-args> | CtrlP

Then just use :CtrlPDefInput profile.

It's an option because allowing :CtrlP search-string while already having :CtrlP path/ can complicate things quite a bit.

@kien kien closed this Apr 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment