40 ms·
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
by bandrami 10y 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)
- aji 10y agoand ^I for tab, etc
- jerf 10y agoIf 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.
- FreeFull 10y agoYou 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.
- dolzenko 10y ago> 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.
- Bedon292 10y agoIt is explained under the chart for [ and Esc. CTRL zeroes out the first two bits of a character. So that is the explanation.