4

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 vague and assume too much that you know what you are doing to some extent.

Can someone post a full, step-by-step tutorial on how to get code completion working properly, for complete Vim newbies (for dummies?)?

4
  • 1
    What is wrong with normal omnicompletion, ^X^O? My vim does this awesomely by default. Commented Oct 5, 2009 at 17:30
  • the default omnicompletion only works on the standard library, I believe.. Commented Oct 5, 2009 at 22:58
  • ok. mine works with 3rd-party (gobject) and my own modules inside my package as well. Commented Oct 10, 2009 at 23:57
  • Does this answer your question? Vim autocomplete for Python Commented Dec 11, 2021 at 6:11

4 Answers 4

4

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

Sign up to request clarification or add additional context in comments.

Comments

2

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.

Comments

1

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.

1 Comment

David Winslow, pyflakes is for code checking, not code completition !
0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.