4 ms·
I’ve been using vim bindings for a decade and never knew this…
by maccard 6mo ago
I’ve been using vim bindings for a decade and never knew this…
- skydhash 6mo agoIt's about the ascii code and terminal code. (Almost?) Every non-printing character can be entered with Ctrl+<some keyboard key>. With Control pressed, D is eot (end of transmission), G is bell, H is backspace, I is line feed (next line), L is form feed (new page), M is carriage return (start of line), Z is substitute, and [ is escape.
- billforsternz 6mo agoI is tab ('\x09' or '\t') and J is new line ('\x0a' or '\n'). These Ctrl combinations follow a predictable linear mapping to the control character section of the ASCII table. Basically Ctrl subtracts 0x40, so I is 0x49, Ctrl I is 0x09.
- __mharrison__ 6mo agoTIL: Ctrl subtracts 40. (28 year emacs user)
- pjz 6mo agoon a linux box try `man ascii`
- __mharrison__ 6mo agoThere are lots of man pages. This one doesn't mention Ctrl being minus 40. Not sure what the point is.
- redlewel 6mo agoThis is how I felt when I got told :D