在Slime中复制/添加整个Lisp表单 [英] Copy/Yank entire Lisp form in Slime

查看:126
本文介绍了在Slime中复制/添加整个Lisp表单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以在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).

推荐答案

在我的Emacs中,功能

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屋!

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