【发布时间】:2011-10-16 16:38:50
【问题描述】:
如何在emacs中用多行替换匹配项。
示例:- 将“狗”替换为 叫声 动物
如下图
The Dog
与
The Barking
animal
我在命令 replace-regexp 中尝试了 \n,对此 emacs 抛出错误说 在替换文本中使用了无效的“\”
【问题讨论】:
标签: emacs
如何在emacs中用多行替换匹配项。
示例:- 将“狗”替换为 叫声 动物
如下图
The Dog
与
The Barking
animal
我在命令 replace-regexp 中尝试了 \n,对此 emacs 抛出错误说 在替换文本中使用了无效的“\”
【问题讨论】:
标签: emacs
正如in this article 所记录的,如果您使用的是 Mx replace-string,答案是使用 CqCj 输入换行符
所以对你来说:
M-x replace-string RET
Dog RET Barking C-qC-j animal RET
【讨论】: