How to replace a character with a newline in Emacs?

前端 未结 6 528
灰色年华
灰色年华 2020-12-12 09:06

I am trying to replace a character - say ; - with a new line using replace-string and/or replace-regexp in Emacs.

I have tried

6条回答
  •  暖寄归人
    2020-12-12 09:22

    Don't forget that you can always cut and paste into the minibuffer.

    So you can just copy a newline character (or any string) from your buffer, then yank it when prompted for the replacement text.

提交回复
热议问题