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.
Emacs, Tab, Indentation, Whitespace
Emacs Line Ending
emacs and elisp regex
- Emacs: Regular Expression
- Emacs: List Matching Lines
- Emacs: Regular Expression Syntax
- Emacs: Regex Backslash in Command Prompt
- Emacs: Case Sensitivity in Text Search Commands
- Emacs: Insert Tab or Newline
- Emacs: Wildcards vs Regular Expression
- Elisp: Regular Expression
- Elisp: Regex Functions
- Elisp: Regex Backslash in Lisp Code
- Elisp: Case Sensitivity (case-fold-search)
- Elisp: Find Replace Text in Buffer
- Elisp: Match Data (Regex Result)
- Elisp: Unicode Escape Sequence
- Elisp: Convert Regex to Lisp Regex String
- Elisp: How to Test Regex
- Elisp: Regular Expression in Lisp Syntax, Rx (Package)
- Elisp: Regex Named Character Class and Syntax Table
- Emacs Regex vs Regex in Python, JavaScript, Java