I wonder if there is a way to jump to Python method definition in VIM using static code analysis (as described in https://gist.github.com/igemnace/dfa545d0d71228e010876d48a420a50b).

For example, if I have two files base.py:

class MyBase:
    def foo(self):

and bar.py:

class MyClass(MyBase):
    def bar(self):
        self.foo()   # How to jump to base.py:MyBase:foo having cursor here

How to jump to base.py:MyBase:foo definition from bar.py:MyClass:bar without having to choose correct place from ctags list?


1 Answer 1


If you are willing to join the LSP fandom you could install a client like LanguageClient (the repo name is misleading, it works with Vim 8 too) and use Microsoft's Pyright calling it as pyright-langserver --stdio. I have been using it recently and works like a charm. The best part is you get more than just jump to definition

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.