Use this page to discuss script 1542 pythoncomplete: Python Omni Completion

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on
  • This page may be out of date: check the script's page above, and its release notes.

Known issues[edit source]

The docstrings buffer doesn't disappear after the autocompleted option is selected.

This is not an issue with the plugin, this is just how Vim works when you have "preview" in your 'completeopt'. The following helps me for C completion. --Fritzophrenic 18:11, May 4, 2011 (UTC)
    " close the preview window if it was opened in insert mode (probably because
    " of omnicompletion with the 'preview' option set in completeopt)
    augroup closepreview
      " Detect if the preview window existed before entering insert mode.
      autocmd InsertEnter * let t:preview_open=IsPreviewWinOpen()

      " Close the preview window when exiting insert mode so that the
      " completion-menu "preview" option doesn't get in the way of editing.
      " But, don't close it if it was already open before insert mode, or if on
      " the command line (pclose is not allowed on the command line)
      autocmd InsertLeave *
            \ if !t:preview_open && bufname('') !~# (v:version < 702 ? 'command-line' : '\[Command Line\]') |
            \   pclose |
            \ endif
    augroup END

    function! IsPreviewWinOpen()
      let winnum=winnr('$')
      while winnum > 0
        if getwinvar(winnum, '&previewwindow')
          return 1
        let winnum -= 1
      return 0

Comments[edit source]

Python Omnicomplete locks me up and I can't switch to insert mode. I get "E523: Not allowed here" message. I use it with neocomplcache and the maintainer of neocomplcache suggested I report this to python omnicomplete. This is basically what happens. I am on OS X with VIM 7.3.646. 16:14, 2012-09-08 (UTC)

Community content is available under CC-BY-SA unless otherwise noted.