++wythern++

X presents Y for a better Z

[转]在Emacs里面如何替换有换行符的字符串

[Source] 
http://zh-cn.w3support.net/index.php?db=so&id=613022

1. M-x replace-string ; \n
   will replace ";" with 2 characters "\n".

2. M-x replace-regex ; \n
   get a error msg: Invalid use of `\' in replacement text.
   in this mode use C-q C-j to insert a RET into the string you current edited for replace/replaced.

The author also said that you could paste a RET into the string for instead the method above, but i have not tested that.




posted on 2011-07-01 10:54 wythern 阅读(1891) 评论(0)  编辑 收藏 引用


只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理