Vim Tips Wiki

Changes: Script:2473


Back to page

(standard format)
(adjust Template:ScriptComments to remove id as no longer needed; minor tweaks)
Line 1: Line 1:
{{ScriptComments|2473|python_open_module: open Python module file at cursor}}
{{ScriptComments|python_open_module: open Python module file at cursor}}

Latest revision as of 07:40, November 15, 2011

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