Vim Tips Wiki


1,624pages on
this wiki
Add New Page

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.


Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Also on Fandom

Random Wiki