Getting proper code completion for Python on Vim?

后端 未结 4 1194
礼貌的吻别
礼貌的吻别 2021-01-06 07:42

I\'ve gotten omnicompletion with Pysmell to work before, but I can\'t seem to do it again.

I tried following some steps online, but most, if not all, of them are to

相关标签:
4条回答
  • 2021-01-06 07:43

    There's also Ctrl+n in insert mode which will autocomplete based on the words it has seen in any of the open buffers (even in other tabs).

    0 讨论(0)
  • 2021-01-06 07:44

    You may try Pydiction (Excerpt below)

    Description Pydiction allows you to Tab-complete Python code in Vim, including: standard, custom and third-party modules and packages. Plus keywords, built-ins, and string literals.

    0 讨论(0)
  • 2021-01-06 07:46

    Pyflakes has a vim plugin that does this pretty awesomely. Unlike Pydiction, you don't need to build a dictionary beforehand (so if you're bouncing between different virtualenvs it's a bit less hassle.) I haven't been using it long but it seems very slick.

    0 讨论(0)
  • 2021-01-06 08:05

    Try hitting Ctrl-p while typing mid-word. Ctrl-p inserts the most recent word that starts with the prefix you're typing and Ctrl-n inserts the next match. If you have several possibilities, you can hit ctrl-p more than once to substitute each candidate in order.

    0 讨论(0)
提交回复
热议问题