Search code examples
vimpython-mode

Disable automatic (preview) window (buffer) with a function signature


Every time I click dot, the function signature appears in a separate buffer.

import sys

sys.argv   # in this moment I have a separate buffer opened with sys.argv signature

Then this buffer exists until manually closed.

I'd like to have it only when I press ctrl-K. Or at least it disappears when I exit insert mode...


Solution

  • Realize that this buffer is called preview window. Thus the :pc or simply <C-w-C-z> works to close it

    CTRL-W CTRL-Z                   *CTRL-W_CTRL-Z* *:pc* *:pclose*
    :pc[lose][!]    Close any "Preview" window currently open.  When the 'hidden'
            option is set, or when the buffer was changed and the [!] is
            used, the buffer becomes hidden (unless there is another
            window editing it).  The command fails if any "Preview" buffer
            cannot be closed.  See also |:close|.