How to increase the height/size of the results/match window for the vim ctrlp plugin?

1k views Asked by At

With the vim ctrlp (control-p) plugin, when I execute the control+p command to search for files, the window showing the results is at most 10 lines high. How can I make it bigger, and take up my entire window so I can see more results at a time?

screenshot showing results window limited to 10 lines

1

There are 1 answers

1
Rob Bednark On BEST ANSWER

Set the max value for the ctrlp_match_window (in your vim session or in your .vimrc file), e.g.,

:let g:ctrlp_match_window = 'min:4,max:999'

screenshot showing setting the variable screenshot showing the results taking up the whole window

Per :help g:ctrlp_match_window :

*'g:ctrlp_match_window'*

Change the position, the listing order of results, the minimum and the maximum heights of the match window:
...

The minimum and maximum heights:
min:{n} - show minimum {n} lines (default: 1).
max:{n} - show maximum {n} lines (default: 10).

The maximum number of results:
results:{n} - list maximum {n} results (default: sync with max height).

See also: https://github.com/kien/ctrlp.vim/issues/187#issuecomment-44924110