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 the function foo
This should work regardless of whether foo is in
1) the local project directory
2) in some ~/.virtualenvs/bar/lib/site-packages
3) in some other python-path
4) virtual env is in use (ie, it should look in my current virtualenv)
Does the pymacs/ropemacs combination do any of this?
To avoid the -e you can use etags and with a find you recursively add the py file:
find . -type f -name '*.py' | xargs etags
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With