5 ms·
This is common knowledge already, but the Esc key to change modes was chosen because it made sense when used in ADM-3A[1], which was the terminal used to develo
by dbolgheroni 3y ago
This is common knowledge already, but the Esc key to change modes was chosen because it made sense when used in ADM-3A[1], which was the terminal used to develop the initial vi version.
Although many people today use Caps Lock for this, the Esc in these terminals was originally in Tab's position.
[1] https://en.wikipedia.org/wiki/ADM-3A https://en.wikipedia.org/wiki/ADM-3A
- kps 3y agoTECO, though not a visual editor, used the same `[count] command [text ESC]` structure as vi. (It's not a mode switch, it's an argument terminator.)
- csdvrx 3y agoIn my vim: - using Tab while in insert mode leaves the insert mode - using Tab while typing commands enables the autocomplete I believe this is a great setup to be closer to the home row when it's not possible to remap Caps to Esc (when alone)+Control (when chorded)
- kugurerdem 3y agoBut what do you use to insert tabs then? For me, giving up Caps Lock would be a lot more convenient than giving up Tab, because I almost never use Caps Lock, whereas I use Tab a lot.
- csdvrx 3y agoInitially, this was my "alternative" setup when I couldn't have Caps lock mapped to both Esc+Control and only doing control, but I've found it easier than using Control-[ for Esc (I never got into this habit) and more reliable that betting wherever I expect Esc to be on the keyboard is where Esc will actually be, or that I'll be on a system with Caps properly remapped. I need to reliably enter/leave edit mode way more than I need to insert tabs, but I can still insert tabs when needed with Ctrl-q Tab When do you need to insert tabs in vim? Personally, I rarely need to insert raw tabs: the only exception may be Makefiles (and for that I have a configuration)
- AmalgatedAmoeba 3y agoWouldn’t consider it a real alternative, but you increase/decrease indentation in insert mode with ^t/^d
- kugurerdem 3y agoI didn't know that, that's a really cool information. Thank you! :)