Emacs: How to Insert a Tab Character or Newline
Insert a Tab Character or Newline
- To insert a literal tab character: Press Ctrl + q Tab.
- To insert a newline: Press Ctrl + q Enter.
- To insert a literal ASCII Carriage Return (Unicode codepoint 13): Press Ctrl + q Ctrl + m.
- To insert a literal ASCII Line Feed (Unicode codepoint 10): Press Ctrl + q Ctrl + j.
WARNING: You do NOT need to insert CR, unless you have a reason to. Emacs buffer always use LF for newline. On saving file, emacs converts the buffer's LF to proper line ending character specified for the buffer/file. [see Emacs: Newline Convention CR LF]
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 Regular Expression
- Regular Expression
- Regex Syntax
- About Quoting Regex
- Case Sensitivity
- How to Insert a Tab or Newline
- Wildcards vs Regex
- Emacs Regex vs Python, JavaScript, Java