user90150
user90150

Reputation:

How to edit multiple strings in emacs at sametime?

I want edit multiple strings at once by selection the list of strings needs to edit. After selection, when I type, it should modify all the text in the selected strings.

How to achieve multiple string edit?

Upvotes: 2

Views: 589

Answers (3)

sanityinc
sanityinc

Reputation: 15242

You want "all.el" by Per Abrahamsen:

Just like occur, except that changes in the All buffer is propagated to the original buffer.

Essentially you say

M-x all RET pattern RET

then edit the matching occurrences in All. Changes made in that buffer are propagated back into the original buffer.

I personally find this much more convenient than iedit, but YMMV.

It's hard to track down the source code for all.el, so I pasted it here.

Upvotes: 1

Trey Jackson
Trey Jackson

Reputation: 74480

I really like iedit.el, which highlights all the occurrences of the string, and shows you the modifications as you make them.

Upvotes: 4

msw
msw

Reputation: 43527

replace-string or query-replace quoth the Emacs manual.

Upvotes: 1

Related Questions