Has anyone found a good set of python plugins for vim -- specifically module completion?

I'm looking for a suite of plugins that can help me finally switch over to vim full-time.

Right now I'm using Komodo with some good success, but their vim bindings have enough little errors that I'm tired of it.

What I do love in Komodo, though, is the code completion. So, here's what I'm looking for (ordered by importance).

  • Code completion, meaning: the ability to code complete modules/functions/etc. in any module that's on the pythonpath, not just system modules. Bonus points for showing docstrings when completing.
  • Jump-to a class definition. I'm guessing CTAGS will do this, so how do you all manage automatically updating your tags files?
  • Project type management for managing buffers: ideally the ability to grep for a filename in a directory structure to open it. Bonus for showing an index of class definitions while a buffer is open.
  • Bzr integration. Not super important, since most of it I can just drop to the shell to do.

Asked by: Daisy931 | Posted: 01-10-2021

Answer 1

Here you can find some info about this.

It covers code completion, having a list of classes and functions in open files. I haven't got around to do a full configuration for vim, since I don't use Python primarily, but I have the same interests in transforming vim in a better Python IDE.

Edit: The original site is down, so found it saved on the web archive.

Answered by: Madaline307 | Posted: 02-11-2021

Answer 2

And I write another plugin: https://github.com/klen/python-mode

Old (now its more powerful) screencast here: https://www.youtube.com/watch?v=67OZNp9Z0CQ

Answered by: Miranda858 | Posted: 02-11-2021

Answer 3

Old question, but I typed all this up for a misread question...

General plugin recommendations: LookupFile and a plugin for your source control system (I like Git and Git-Vim).

Python plugin recommendations: If you're using Linux, I'd recommend ipython and ipy.py (a better interactive interpreter). Improved syntax highlighting, snippets, pydoc, and for refactoring support bicyclerepairman. I got started with this post.

You may want to try looking through someone's vimfiles. Mine are on github.

Answered by: Lily784 | Posted: 02-11-2021

Answer 4

For refactoring: ropevim

Answered by: Ada330 | Posted: 02-11-2021

Answer 5

Here is some info on Bazaar integration if you're interested:


Answered by: Lenny391 | Posted: 02-11-2021

Answer 6

I use pydoc.vim (I actually wrote it) a lot, try it and tell me what you think. Another one that I think is quite useful is the updated syntax file with all it's extensions that you can enable, which you can find here.

Answered by: Ned915 | Posted: 02-11-2021

Answer 7

I use Pydiction (http://www.vim.org/scripts/script.php?script_id=850) it's a plugin for vim that lets you Tab-complete python modules/methods/attributes/keywords, including 3rd party stuff like Pygame, wxPython, Twisted, and literally everything. It works more accurately than other things i've tried and it doesn't even require that python support be compiled into your Vim.

Answered by: Melanie116 | Posted: 02-11-2021

Answer 8

Code completion: PySmell looks promising. It's work-in-progress, but alredy useful.

Answered by: Carina226 | Posted: 02-11-2021

Answer 9

I personally thinkJedi Vim is the best, but it is incompatible with python-mode.

Answered by: Adelaide976 | Posted: 02-11-2021

Similar questions

How do I add tab completion to the Python shell?

When starting a django application using python manage.py shell, I get an InteractiveConsole shell - I can use tab completion, etc. Python 2.5.1 (r251:54863, Apr 15 2008, 22:57:26) [GCC 4.0.1 (Apple Inc. build 5465)] on darwin Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) When just starting a python interpreter using python

Python tell when an ftp transfer sits on completion

I have to download some files from an FTP server. Seems prosaic enough. However, the way this server behaves is if the file is very large, the connection will just hang when the download ostensibly completes. How can I handle this gracefully using ftplib in python? Sample python code: from ftplib import FTP ... ftp = FTP(host) ftp.login(login, passwd) files=ftp.nlst() ftp.set_debuglevel(2)...

python tab completion in windows

I'm writing a cross-platform shell like program in python and I'd like to add custom tab-completion actions. On Unix systems I can use the built-in readline module and use code like the following to specify a list of possible completions when I hit the TAB key: import readline readline.parse_and_bind( 'tab: complete' ) readline.set_completer( ... ) How can I do this on Windows? I'd like to...

python - IO completion port key confusion

I'm writing an IO completion port based server (source code here) using the Windows DLL API in Python using the ctypes module. But this is a pretty direct usage of the API and this question is directed at those who have a knowledge of IOCP, not Python. As I understand the documentation for...

Getting proper code completion for Python on Vim?

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

python - Trick code completion with PyDev like with PDT?

Is there a way to help PyDev code completion by telling it the type of a variable? With PDT, you can use PHPDoc-like syntax for such purpose: /* @var $my_var MyClass */ $my_var = myFunction(); // PDT is able to figure out that $my_var is a MyClass object. But till now, I cannot figure out how to do the same in python.

mercurial - Tab Completion in Python Command Line Interface - how to catch Tab events

I'm writing a little CLI in Python (as an extension to Mercurial) and would like to support tab-completion. Specifically, I would like catch tabs in the prompt and show a list of matching options (just like bash). Example: Enter section name: ext*TAB* extensions extras The problem is I'm not sure how to catch the Tab events. I'm using the ui.prompt() API of Merc...

Code completion in NetBeans' python plugin does not work properly

I am asking on StackOverflow because surely I am doing something completely silly and I hope S.O. might provide me with a quick answer. I've installed the latest stable Python-plugin for NetBeans. It works great, and I tested code completion with various packages such as sys, os and so on. It works beautifully. However, it does not seem to pick up the code completion for the code in my ow...

python - Weird behaviour with optparse and bash tab completion

I am building a script for users new to Linux, so please understand why I am asking this :) My script runs like this: python script.py -f filename.txt I am using the optparse module for this. However, I noticed the following when doing tab completion. The tab completion works when I do: python script.py <tab completion> # Tab completion wo...

python - which inotify event signals the completion of a large file operation?

for large files or slow connections, copying files may take some time. using pyinotify, i have been watching for the IN_CREATE event code. but this seems to occur at the start of a file transfer. i need to know when a file is completely copied - it aint much use if it's only half there. when a file transfer is finished and completed, what inotify event is fired?

Still can't find your answer? Check out these communities...

PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python