Emacs的 - Python的变量制表完成 [英] Emacs - tab-completion of local Python variables

查看:122
本文介绍了Emacs的 - Python的变量制表完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个良好emacs模式,将允许本地蟒蛇变量制表完成?我设置了ipython.el,但它会在国米preTER的范围仅制表完成的事情。我在寻找的东西,让我卡完成令牌功能或文件的本地命名空间。

Is there a good emacs mode that will allow tab-completion of local python variables? I set up ipython.el but it will only tab-complete things in the scope of the interpreter. I'm looking for something that will let me tab-complete tokens in the local namespace of a function or file.

推荐答案

M- /运行命令dabbrev扩张。这将在任何模式下完成本地名称。
此外,我绑定元f1到嬉皮所有打开的缓冲区扩大。这对我来说是非常有用的。

M-/ runs the command dabbrev-expand . This will complete local names in any mode. Also I bind meta f1 to hippie expand from all open buffers. This is very useful for me.

;; Bind hippie-expand
(global-set-key [(meta f1)] (make-hippie-expand-function
                               '(try-expand-dabbrev-visible
                                 try-expand-dabbrev
                                 try-expand-dabbrev-all-buffers) t))

希望这是非常有用的。

Hope this is useful.

这篇关于Emacs的 - Python的变量制表完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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