YouCompleteMe icon indicating copy to clipboard operation
YouCompleteMe copied to clipboard

Is there a way fix the size of completion menu in vim?

Open ioeric opened this issue 7 years ago • 4 comments

Hi,

Is there a way to fix the size of the completion window to, for example, 10 items. Note that I would still like to get all completion items (e.g. more than 10) from ycmd completer (i.e. g:ycm_max_num_candidates wouldn't work) so that I can scroll the window to browse more items.

Thanks!

ioeric avatar Feb 20 '19 10:02 ioeric

There is no control over that in YCM.

If any such feature existed it would be a vim setting. Try reading :help ins-completion to see if there are options that work for you.

puremourning avatar Feb 20 '19 11:02 puremourning

Already answered in https://github.com/Valloric/YouCompleteMe/issues/166, https://github.com/Valloric/YouCompleteMe/issues/173, and https://github.com/Valloric/YouCompleteMe/issues/1978. From CONTRIBUTING.md:

Further, search the issue tracker for similar issues before creating a new one. There's no point in duplication; if an existing issue addresses your problem, please comment there instead of creating a duplicate.

and the issue template:

I have searched YCM's issue tracker to find issues similar to the one I'm about to report and couldn't find an answer to my problem. (Example Google search.)

micbou avatar Feb 20 '19 11:02 micbou

Sorry about the duplicate! I should've spent more time searching the issue tracker.

ioeric avatar Feb 20 '19 11:02 ioeric

To anyone who has found this issue through google, the answer to OP's question is to insert set pumheight=10 in your .vimrc. This is indeed a general Vim option, described in :help ins-completion-menu

klosworks avatar Mar 05 '19 15:03 klosworks