如何在emacs的python中使用meta-dot(M-)? [英] How can I use meta-dot (M-.) in python with emacs?

查看:147
本文介绍了如何在emacs的python中使用meta-dot(M-)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有相当于python的粘液?



例如,如果我将光标放在foo()上,然后执行M-。 (跳到定义)我想看到功能的源定义foo



这应该工作,无论foo是否在$ /

1)本地项目目录



2)某些〜/ .virtualenvs / bar / lib / site-packages



3)在其他一些python-path



4)虚拟环境正在使用(即它应该看看我当前的virtualenv) / p>

pymacs / ropemacs组合是否执行任何操作?

解决方案

为了避免-e,你可以使用etags,并通过一个find来递归地添加py文件:

  find。 -type f -name'* .py'| xargs etags 


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

这篇关于如何在emacs的python中使用meta-dot(M-)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆