How to replace a region in emacs with yank buffer contents?

后端 未结 7 2067
一向
一向 2020-12-24 05:26

When I use VIM or most modeless editors (Eclipse, NetBeans etc.) I frequently do the following. If I have similar text blocks and I need to change them all, I will change on

7条回答
  •  无人及你
    2020-12-24 06:00

    The way I do this is:

    • go to where you want the new stuff
    • paste the good stuff
    • your cursor is now between the new stuff and the stuff you want to get rid of
    • select forward until everything you want to get rid of is selected
    • delete it

    It's a slightly different way of thinking about it. Paste what you want, then get rid of what you don't want, rather than replace what you don't want with what you do.

提交回复
热议问题