Replacing with a string with newline in Emacs? Posted on Mar 24, 2018 by Eric Ma In QA How to replacing a string with another string with newline in Emacs? For example, to replace: good editor with good editor: Emacs What you need is actually to input a newline in Emacs: C-q C-j C-q is for quoted-insert, and C-j is a newline (0xa). Read more: Replacing tabs with spaces in Emacs How to remove newline characters from a string in C++? How to convert between dos and unix file coding in Emacs? Emacs highlighting part of lines that go over 80 chars Emacs Tips and Howtos Making Emacs Start Up Faster How to make Emacs run in command line by default? How to print the name of the current file being edited in Emacs?