Vim Tips Wiki
(Created page with " 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 ...")
 
(Insert TipProposed template + minor manual clean)
 
Line 1: Line 1:
  +
{{TipProposed
  +
|id=0
  +
|previous=0
  +
|next=0
  +
|created=March 23, 2012
  +
|complexity=basic
  +
|author=
  +
|version=7.0
  +
|subpage=/201203
  +
|category1=
  +
|category2=
  +
}}
 
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===
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:
 
  +
<pre>
 
autocmd FileType python set omnifunc=pythoncomplete#Complete
  +
</pre>
   
 
===Prevent Pydoc preview window===
=== Enable Python omnicomplete ===
 
  +
<pre>
 
set completeopt-=preview
  +
</pre>
   
 
===Dismiss immediately===
<code>autocmd FileType python set omnifunc=pythoncomplete#Complete</code>
 
 
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]]:
  +
<pre>
 
autocmd CursorMovedI * if pumvisible() == 0|pclose|endif
 
autocmd InsertLeave * if pumvisible() == 0|pclose|endif
  +
</pre>
   
  +
==Comments==
=== Prevent Pydoc Preview Window ===
 
 
<code>set completeopt-=preview</code>
 
 
=== 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:
 
 
<code>autocmd CursorMovedI * if pumvisible() == 0|pclose|endif</code>
 
 
<code>autocmd InsertLeave * if pumvisible() == 0|pclose|endif</code>
 

Latest revision as of 09:55, 27 March 2012

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 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

Comments[]