How can I use meta-dot (M-.) in python with emacs?

后端 未结 6 1591
余生分开走
余生分开走 2021-02-07 00:58

Is there an equivalent of slime for python?

For example, if I position the cursor on foo() and do M-. (jump to definition) I would like to see the source definition of

6条回答
  •  半阙折子戏
    2021-02-07 01:41

    Most of the answers mentioned here are outdated. A simple solution is to use elpy for M-. without etags(which requires additional work).

    Install elpy as mentioned here.

    M-x package-install elpy
    

    and then install python packages

    $ sudo pip install rope jedi
    

    Restart emacs , open any python file and run M-.

    Elpy is fully documented, you can read about M-. here.

提交回复
热议问题