Emacs: Insert Tab or Newline
Insert a Tab Character or Newline
- Ctrl+q Tab → insert a literal tab character.
- Ctrl+q Ctrl+j → insert a newline character.
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.