【问题标题】:how to replace a search with multiple lines in emacs?如何在emacs中用多行替换搜索?
【发布时间】:2011-10-16 16:38:50
【问题描述】:

如何在emacs中用多行替换匹配项。

示例:- 将“狗”替换为 叫声 动物

如下图

The Dog 

The Barking
animal

我在命令 replace-regexp 中尝试了 \n,对此 emacs 抛出错误说 在替换文本中使用了无效的“\”

【问题讨论】:

    标签: emacs


    【解决方案1】:

    正如in this article 所记录的,如果您使用的是 Mx replace-string,答案是使用 CqCj 输入换行符

    所以对你来说:

    M-x replace-string RET Dog RET Barking C-qC-j animal RET

    【讨论】:

      猜你喜欢
      • 2018-05-16
      • 2010-10-30
      • 2013-12-29
      • 2013-05-20
      • 2015-08-24
      • 2021-02-18
      • 1970-01-01
      • 1970-01-01
      • 2012-06-23
      相关资源
      最近更新 更多