Vim Tips Wiki


Revision as of 07:40, November 15, 2011 by JohnBot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
1,614pages on
this wiki

Use this page to discuss script 2473 python_open_module: open Python module file at cursor

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


This script is buggy and won't work in some situations. For example, it doesn't support navigating python sources, which contain multi-line imports like this:

    import some.very.long.module, \
    from some.very.long import module, \
                       function, CONSTANT

because it handles the buffer as a bunch of single lines. It needs some serious fixing in this regard.

Even after fixing that I couldn't make it work on the sources I was working on. It works with simple test 'hello-world'-type scripts.

It seems to me that trying to actually parse the edited buffer with now-obsolete compiler package is not a good idea.

Unfortunately, I know not of any alternatives to this. Will probably have to write my own plugin. If I do, I'll post a note here as well.


Around Wikia's network

Random Wiki