4 ms·
You know that CTRL + [ functions same as ESC right? Sr. dev at my job told me about this a year ago and it made vim SIGNIFICANTLY more comfortable to use day t
by redlewel 5mo ago
You know that CTRL + [ functions same as ESC right? Sr. dev at my job told me about this a year ago and it made vim SIGNIFICANTLY more comfortable to use day to day.
- maccard 5mo agoI’ve been using vim bindings for a decade and never knew this…
- skydhash 5mo 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 5mo 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__ 5mo agoTIL: Ctrl subtracts 40. (28 year emacs user)
- pjz 5mo agoon a linux box try `man ascii`
- __mharrison__ 5mo agoThere are lots of man pages. This one doesn't mention Ctrl being minus 40. Not sure what the point is.
- redlewel 5mo agoThis is how I felt when I got told :D