tags:

views:

450

answers:

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

A: 

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.

Lorenzo
+1  A: 

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.

ThisIsMeMoony
A: 

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

Pierre-Antoine LaFayette
+1  A: 

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.

David Winslow