4 ms·
The ESC key in vi is idempotent. It's not doing it wrong to hit it thousands of times. It's doing it wrong to have to model the state of your editor in your hea
by jes5199 15y ago
The ESC key in vi is idempotent. It's not doing it wrong to hit it thousands of times. It's doing it wrong to have to model the state of your editor in your head.
I have a similar habit of typing "git " in my terminal, and then getting distracted while I think through what I'm trying to do, and then just typing "git " again. Rather than punish myself, I just wrote a script called git-git. https://github.com/jes5199/git-git https://github.com/jes5199/git-git so I can type "git git git push" and it works.
- nullmodem 15y agoYou can also achieve the same effect by placing the following in your .gitconfig: [alias] git = !git
- jasonwatkinspdx 15y ago"It's ... wrong to have to model the state of your editor in your head." from the mouth of a vi user...
- ramblerman 15y ago" It's doing it wrong to have to model the state of your editor in your head " WAT? By that logic you don't know if you are in insert mode half the time, and start typing random characters all over the place.
- jes5199 15y agoNever stay in insert mode unless you are typing! Insert mode is a brief experience. itype type type<esc>