Emacs: Insert Tab or Newline

By Xah Lee. Date: . Last updated: .

Insert a Tab Character or Newline

Sometimes you need to insert a literal tab or newline. Pressing Tab may not work, because it does indentation, and pressing return may do completion or submit input in minibuffer.

Note, to insert a literal carriage return: Press Ctrl+q Ctrl+m, or Ctrl+q Return. Note, you almost never need to do this, unless you specifically need a carriage return char.

What does Ctrl+q mean?

Ctrl+q is the shortcut for the command quoted-insert. It let you enter the next typed charater literally.

Emacs, commands using regex

Emacs, Tab, Indentation, Whitespace

Emacs Line Ending