Fandom

Vim Tips Wiki

Omnicomplete - Remove Python Pydoc Preview Window

1,624pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Proposed tip Please edit this page to improve it, or add your comments below (do not use the discussion page).

Please use new tips to discuss whether this page should be a permanent tip, or whether it should be merged to an existing tip.
created March 23, 2012 · complexity basic · version 7.0

The Pydoc window comes up whenever you use <Ctrl-x><Ctrl-o> to complete a function or variable name when using Omnicomplete with Python. If you don't want it to come up all the time use the following in vimrc:

Enable Python omnicompleteEdit

autocmd FileType python set omnifunc=pythoncomplete#Complete

Prevent Pydoc preview windowEdit

set completeopt-=preview

Dismiss immediatelyEdit

Alternatively, if you still want PyDoc information to display, but would like it to disappear automatically without exiting insert mode, add the following to vimrc:

autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
autocmd InsertLeave * if pumvisible() == 0|pclose|endif

CommentsEdit

Also on Fandom

Random Wiki