0

Emacs 26.1, Windows 10, package iedit

Suppose I want to delete text onMessage

I select this text by iedit-mode (C-;)

enter image description here

To remove selected text I press many times button Backspace

Nice. It's work.

But it slow. Is is possible to delete selected text faster?

Here result: enter image description here

P.S. I found solution by kill-region enter image description here

and after kill-region enter image description here

0

2 Answers 2

2

Put point into one of the iedit-occurrences and press M-D (Meta key, shift key, and D key).

That key sequence runs the command iedit-delete-occurrences that deletes all occurrences selected by iedit.

Note that I tested this with the current git-version of iedit. But I found iedit-delete-occurrences even in the v0.9.9.9 tag. So it should work with all current versions of iedit.

0

After you selected all the words onMessage in your example using iedit-mode your point is usually at the beginning or at the end of the word(s) depending on how you call iedit-mode.

kill-word or backward-kill-word does what you want depending on where the point on the word is.

If the point is on the beginning of the word you can use kill-word to kill all the marked words. This is bound to <C-delete>

If the point is on the end of the word then you can use backward-kill-word to kill all the marked words. This is bound to <M-backspace> or M-DEL.

5
  • But if I need to kill many words. Then I need to use kill-region ? Mar 4, 2019 at 10:24
  • For me kill-region does not work. Just as backspace in you example kill-word and backward-kill-word operate on all marked words at the same time. I updated my answer a bit. Hope it clarifes things a bit.
    – andrej
    Mar 4, 2019 at 13:07
  • Please clarify in the question whether you want to just delete the text or kill it. Killing it puts it on the kill-ring so you can then yank (paste) it. Deleting it does not do that.
    – Drew
    Mar 4, 2019 at 15:37
  • @andrej I test by kill-region and it's success work. I updated my post Mar 4, 2019 at 16:10
  • @Drew no matter. I just need to remove the selected text. Mar 4, 2019 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.