How to edit multiple strings in emacs at sametime?
I want edit mu开发者_开发技巧ltiple 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?
I really like iedit.el
, which highlights all the occurrences of the string, and shows you the modifications as you make them.
replace-string or query-replace quoth the Emacs manual.
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.
精彩评论