在Slime中复制/添加整个Lisp表单 [英] Copy/Yank entire Lisp form in Slime
问题描述
是否可以在Slime/Emacs中复制/粘贴整个表单?
Is there a way to copy/yank a whole a form in Slime/Emacs?
例如,如果我具有以下功能:
For instance, if I have the following function:
(myfunc (lst)
(myotherfunc lst))
我想拉/复制:
(myotherfunc lst)
当我的光标位于该表单的开头或结尾括号(在Slime/Emacs进行括号匹配的位置)时,发出键盘快捷键.
by issuing a keyboard shortcut when my cursor is at the opening or closing parenthesis for that form (at the point where Slime/Emacs does parenthesis matching).
推荐答案
In my Emacs, function kill-sexp
is bound to C-M-k. That is, assuming the point is just before an opening delimiter of a balanced expression, press Control, Meta, and k at the same time.
尽管kill-sexp
命令可能未绑定到相同的键,但该命令还可以在其他各种非Lisp模式下工作,例如以C样式模式杀死用大括号分隔的块.
This same command works in various other non-Lisp modes, such as killing brace-delimited blocks in a C-style mode, though the kill-sexp
command may not be bound to the same keys.
这篇关于在Slime中复制/添加整个Lisp表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!