Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Vim omnicompletion: optional preview window

I've searched for different types of workarounds to deal with the preview window splitting the current window to display documentation when doing a selection in Omnicompletion, like closing the preview window if it exists when you leave insert mode.

However, those solutions are impractical. Sometimes you may want to go into the preview window to read some documentation about the current completing module, but with the autocommand in place this would not be possible.

Even if it would, I am looking to have the documentation never show up because I really don't want it.

Reading the source code in pythoncomplete.vim I see that the value for the documentation is hard coded and it will force the preview window to show up if this has any contents (it skips this if it can't come up with docs for the module).

Is there a global option that I am not aware to tell Vim to never display docs? Or be able to toggle it?

If I do want to read the docs in a split window allow me to do so (maybe with some shortcut) otherwise don't show me anything.

I really want to avoid having to copy/paste pythoncomplete.vim to tweak this particular setting to my liking.

like image 686
alfredodeza Avatar asked Jul 30 '12 12:07

alfredodeza


1 Answers

The preview is controlled by the global 'completeopt' setting. To turn that off, use

:set completeopt-=preview
like image 192
Ingo Karkat Avatar answered Nov 02 '22 15:11

Ingo Karkat