Chris Lasher wrote:

> I sent this email to [email protected], but I am also sending it here so
> more eyes have a chance to see it.
> 
> Vim's omni-completion fails for Python any time a file contains an
> import statement which fails (i.e., any import statement that will
> raise an ImportError). For example:
> 
> import notamodule
> 
> class Foo:
>     def bar(self):
>         pass
> 
> # try omni-completing Foo here <C-x><C-o>
> # then comment out the above import statement and try again
> Fo
> 
> 
> This bug exists even if the import statement is wrapped within a try,
> except clause, e.g.,:
> 
> try:
>     import notamodule
> except ImportError:
>     pass

I don't think this can be solved.  The completion relies on parsing the
file by Python, thus when parsing fails somehow it doesn't know what to
complete.

Aaron, is there something that can be done to avoid this problem?

-- 
Lawmakers made it obligatory for everybody to take at least one bath
each week -- on Saturday night.
                [real standing law in Vermont, United States of America]

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui