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

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

问题描述

我只想删除一些文本,以便我可以拉取一些其他文本而不是.我怎样才能做到这一点?C-w 剪切选定的文本以杀死环,我最终没有想要删除的文本.

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.

此外,是否可以直接拉取文本而不是一些文本,甚至无需按下按钮将其杀死?

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

推荐答案

我经常输入M-x delete-region,但你可以将它绑定到一个键.

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 会插入字符a",然后停用标记.删除选择模式,一种次要模式,修改了此行为:如果启用该模式,则在标记处于活动状态时插入文本会导致首先删除区域中的文本.此外,通常只删除一个字符的命令,例如 C-dDEL,将改为删除整个区域.要打开或关闭删除选择模式,请键入 M-x delete-selection-mode.

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天全站免登陆