Wikia

Vim Tips Wiki

Omnicomplete - Remove Python Pydoc Preview Window

Talk0
1,613pages on
this wiki
Revision as of 08:03, March 23, 2012 by 176.251.101.133 (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 omnicomplete

autocmd FileType python set omnifunc=pythoncomplete#Complete

Prevent Pydoc Preview Window

set completeopt-=preview

Dismiss Immediately

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

Around Wikia's network

Random Wiki