简体   繁体   English

Emacs下python解释器命令历史的块模式

[英]Block mode for command history of python interpreter under Emacs

The interpreter command history in both python.el (Emacs 23) and python-mode.el recall previous code bodies one line at a time (when pressing Mp ). python.el (Emacs 23)和python-mode.el的解释器命令历史记录python-mode.el调用一行代码(按下Mp时 )。

Block recall, such as is used in IPython, IDLE, and Emacs SLIME (Common Lisp), is nicer for revising functions. 块调用,例如在IPython,IDLE和Emacs SLIME(Common Lisp)中使用,可以更好地修改函数。

Is there a way to get block recall in one of the inferior modes for Python in Emacs? 有没有办法在Emacs中以Python的一种劣质模式进行块调用?

EDIT : 编辑

To be specific, if I enter 具体来说,如果我进入

>>> def afunc(x):
...     print x
... 
>>>

and then press Mp , I get 然后按Mp ,我明白了

>>>     print x

instead of the whole function. 而不是整个功能。

You can use Cj instead of RET when entering your code, and it will work. 输入代码时可以使用Cj而不是RET ,它可以工作。 It's not exactly what you ask for, but it doesn't really make a big difference in practice. 这不完全是你所要求的,但它在实践中并没有真正发挥重大作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM