Emacs: how to delete text without kill ring?

后端 未结 15 1011
旧巷少年郎
旧巷少年郎 2020-12-04 14:00

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 with

15条回答
  •  有刺的猬
    2020-12-04 14:46

    how to delete text without kill ring?

    the delete-region function will delete the selected region without adding it to the kill ring

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

    I think you are asking how to replace the text in a selected region with something that you have already put on the kill ring.

    Setting (delete-selection-mode 1) will allow you to yank/paste over a selected region. It also allows you to just type and replace a selected region.

    On version 25.1.1 on OS X I also had to add (setq select-enable-primary nil) to prevent it from copying the selected region to the kill ring

提交回复
热议问题