Comment by bandrami
9 years ago
Oh, that's why ^J is a literal newline in Emacs. How did I miss that for 25 years?
(BTW, for anyone curious, you match a newline in a regexp in emacs by using ^Q ^J, the first is the quote operator and the second is the character you want, ^J, or newline)
If you're wondering "why not ^Q then Enter?", that gets you CR or ^M, but in UNIX, newline or ^J is what gets you to the next line.
So, yes, you normally push CR to enter the LF character.
The confusions between CR and LF run deep and wide, even in the UNIX world.
You will also see ^M on the end of each line in vim, if you open a CRLF line terminated file in it, but it thinks it's a LF line terminated file.
> that's why ^J is a literal newline
So I don't quite understand how that table explains it. I mean aside from the fact J character code being the LF code with first two bits zeroed.
It is explained under the chart for [ and Esc. CTRL zeroes out the first two bits of a character. So that is the explanation.
and ^I for tab, etc