Omnicomplete - Remove Python Pydoc Preview Window
Talk0
1,599pages on
this wiki
this wiki
Recently created tip
We have not yet decided whether to keep this tip as its own page or merge it somewhere else. If you have a suggestion on the tip content, please edit this page or add your comments below (do not use the discussion page).
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:
Contents |
Enable Python omnicomplete
Edit
autocmd FileType python set omnifunc=pythoncomplete#Complete
Prevent Pydoc preview window
Edit
set completeopt-=preview
Dismiss immediately
Edit
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