4 ms·
You had a really nice, informative comment about the history of vi and the weird keyboard of the ADM-3A terminal and then you had to take a cheap shot at vi use
by chongli 7y ago
You had a really nice, informative comment about the history of vi and the weird keyboard of the ADM-3A terminal and then you had to take a cheap shot at vi users. Why?
I've been using vi/vim/nvim for nearly two decades now and I only press escape (actually C-[, since I mapped caps to control) once each time I need to get out of insert mode. I don't have "wrong mode paranoia" because I can see at a glance what mode I'm in by the appearance of the cursor. When I finish inserting, the cursor moves one place to the left and highlights the last character I inserted. In vim it's even easier because the cursor changes appearance in insert mode.
- jasode 7y ago>you had to take a cheap shot at vi users. Why? You misinterpreted. I wasn't taking a cheap shot at vi users. When _I_ use vi, I press Esc multiple times. My behavior is common and this is apparently somewhat of an "in joke" among vi users. It's a behavior similar to pressing 'C' multiple times on calculators to really really clear out the entry. Pointing out that common behavior is not "taking a cheap shot at calculator users". Out of habit, I also press C multiple times on calculators and I don't know why I do that even though my brain's logic says it's redundant. https://www.reddit.com/r/Showerthoughts/comments/a7qeye/the_unspoken_rule_for_using_a_phones_calculator/ https://www.reddit.com/r/Showerthoughts/comments/a7qeye/the_... EDIT ADD: related HN thread about the ":wq" string accidentally being saved in source files because some vi users didn't realize they didn't escape text insert mode: https://news.ycombinator.com/item?id=7798529 https://news.ycombinator.com/item?id=7798529
- addicted 7y agoI’ve never heard of Esc Esc being an in joke amongst Vim users. And I rarely (never?) hit ESC twice, because it’s obvious when I just tapped ESC, and because of VIM’s speed I can immediately see when things changed. Is this a GVim/MacVim thing maybe? Is that slower? Or do all these people hitting ESC twice somehow have bad keyboards which don’t often transmit the ESC key signal? Also, the reason you hit C on calculators twice is because there is actually a reason to hit it in many calculators, and has no connection with Vim, and the difference between the 2 modes isn’t obvious. Hitting C once only clears the current result, but doesn’t clear the previous results. So if you type in 45+ the calculator after hitting C once (assuming you had 46 typed in), the calculator will add 45 to whatever you had originally. OTOH if you hit it twice, in many calculators it will also additionally clear out the previous results, so the 45+ only adds to 0.
- jasode 7y ago>, because it’s obvious when I just tapped ESC, I learned vi (not vim) on old DEC and IBM AIX machines via Telnet (not local GUI). With those more primitive console emulators, the cursor change for different modes wasn't obvious. >Or do all these people hitting ESC twice somehow have bad keyboards which don’t often transmit the ESC key signal? The Esc-double-tap was a very common way to make sure you're not in text insert mode: https://www.google.com/search?q=vi+"press+esc+twice"+command https://www.google.com/search?q=vi+"press+esc+twice"+command For whatever reason (e.g. possibly unawareness of timeoutlen delay causing Esc to behave in unexpected ways), many vi users end up redundantly pressing Esc twice. >Hitting C once only clears the current result, but doesn’t clear the previous results. I thought the newer calculators with dedicated "C" (clear) and "CE" (clear entry) didn't require pressing "C" multiple times. (I just tested this on a Texas Instruments desk calculator with dedicated C & CE buttons and it only requires pressing C once to clear out everything. (But I still press C multiple times out of habit.))
- addicted 7y agoGood to know about the timeoutlen. Also newer calculators have a distinction. But I’ve definitely used older ones where both keys were on the same button (separated by a slash?) but I know I habitually press C twice and it’s likely because the calculator I used most growing up needed you to press C twice for CE.
- johnchristopher 7y agoI have a wrong mode paranoia when I sometimes hit the shift lock key and end up triggering something and find myself in a new tab. Then I close the tab and carefully hit escape many times before undoing whatever was done. It's not my default mode but when I misfire the missile instead of hitting the brakes it's nice to throw some escapes over the fire before getting it under control.
- Zelphyr 7y agoI press Esc multiple times. I don’t need to anymore, I know. But when I was first learned Vi/Vim 25 years ago I sometimes did and it stuck. I also “:w” multiple times for the same reason. Better safe than sorry I guess. I also use “hjkl” for navigation instead of the arrow keys by force of habit because back when I was learning Vi/Vim the arrow keys would sometimes result in odd behavior depending on what system I was in. But “hjkl” always works. Also, modern Mac keyboards...