如何在emacs中同时编辑多个字符串?

发布于 2024-08-24 19:03:20 字数 81 浏览 5 评论 0原文

我想通过选择需要编辑的字符串列表来一次编辑多个字符串。选择后,当我键入时,它应该修改所选字符串中的所有文本。

如何实现多字符串编辑?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

还不是爱你 2024-08-31 19:03:20

我真的很喜欢 iedit.el,它突出显示了所有字符串的出现次数,并显示您所做的修改。

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

傾城如夢未必闌珊 2024-08-31 19:03:20

替换字符串或查询替换引用 Emacs 手册

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

淡莣 2024-08-31 19:03:20

您想要 Per Abrahamsen 的“all.el”:

就像发生的那样,除了All缓冲区中的更改是
传播到原始缓冲区。

本质上,您说

M-x all RET 模式 RET,

然后编辑 All 中的匹配项。该缓冲区中所做的更改将传播回原始缓冲区。

我个人觉得这比 iedit 方便得多,但是 YMMV。

很难找到 all.el 的源代码,因此我将其粘贴到此处

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文