简体   繁体   中英

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.

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

:set completeopt-=preview

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM