emacs苹果酒清除REPL缓冲区 [英] emacs cider clear REPL buffer
本文介绍了emacs苹果酒清除REPL缓冲区的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我只是想清除repl缓冲区,以便在第一行上留下一个提示,例如( user>
).
I simply want to clear the repl buffer so that a single prompt eg (user>
) is left on the first line.
我有一个快捷键:
(put 'erase-buffer 'disabled nil)
(global-set-key (kbd "C-x C-<backspace>") 'erase-buffer)
但这给出了消息:
文本是只读的
有选项 C-c C-o
,但这仅清除最后的返回值.
There is the option C-c C-o
but this only clears the last return value.
使用python和 run-python
时,以下命令 C-x M-o
我相信是 comint-clear-buffer
When using python, and run-python
the following command C-x M-o
which i believe is comint-clear-buffer
推荐答案
cider-repl.el
提供了一个功能 cider-repl-clear-buffer
,默认情况下为绑定到:
cider-repl.el
provides a function cider-repl-clear-buffer
which by default is bound to:
M-x c-r--bu RET
C-c M-b :
as C-c M-b
is not used by cider-repl as far as I am aware:
(add-hook 'cider-repl-mode-hook
'(lambda () (define-key cider-repl-mode-map (kbd "C-c M-b")
'cider-repl-clear-buffer)))
这篇关于emacs苹果酒清除REPL缓冲区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文