Emacs:如何删除没有kill ring的文本? [英] Emacs: how to delete text without kill ring?

查看:97
本文介绍了Emacs:如何删除没有kill ring的文本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想删除一些文字,所以我可以用其他文字替换。我怎样才能做到这一点? Cw切割所选文本以杀死戒指,我最终没有我想要的文本。

I'd like to just delete some text so I can yank some other text instead of it. How can I do that? C-w cuts the selected text to kill ring and I end up without the text I wanted to yank.

另外,是否可以直接以直接方式转换文本 strong>某些文本,甚至不按按钮来杀死它?

Also, is it possible to yank text directly instead of some text without even pressing buttons to kill it?

推荐答案

我键入 Mx删除区域

I type M-x delete-region quite often, but you can bind it it to a key.

使用删除选择模式在较新版本的Emacs中,您不必键入命令,只需开始输入:

With Delete Selection Mode in newer versions of Emacs you don't have to type a command just start typing:


默认情况下,即使标记处于活动状态,文本插入也会正常显示,例如,键入插入字符a,然后取消激活标记。删除选择模式,次要模式,修改此行为:如果启用该模式,则在标记处于活动状态时插入文本会导致该区域中的文本被首先删除。而且,通常仅删除一个字符的命令(例如 C-d DEL 将删除整个区域。要打开或关闭删除选择模式,请键入 M-x删除选择模式。

By default, text insertion occurs normally even if the mark is active—for example, typing a inserts the character ‘a’, then deactivates the mark. Delete Selection mode, a minor mode, modifies this behavior: if you enable that mode, then inserting text while the mark is active causes the text in the region to be deleted first. Also, commands that normally delete just one character, such as C-d or DEL, will delete the entire region instead. To toggle Delete Selection mode on or off, type M-x delete-selection-mode.

这篇关于Emacs:如何删除没有kill ring的文本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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