Re:How Did Vim Become So Popular?
by slim on Wednesday July 01, 2020 @02:36AM
(#23698437)
You may be using vim wrong. Good for you if you like it that way
[ Parent
| on HN ]
You're going to have to explain that one because I generally switch back to command mode after every edit so I use ctrl-[ a lot.
I'd be VERY interested to hear why that's wrong and what you do differently.
my reasoning was : you could have mapped caps lock to ESC but you did not. So maybe you are using CTRL too much (CTRL-V maybe?) which is not the best way to use vim.
No your reasoning is way off. I map to ctrl rather than escape because I want to make use of the Insert and Ex mode ctrl shortcuts.
For example, if I want to insert a register into the ex mode command line I use ctr-r <register>.
Or if I want to pop out of insert mode for a single command I use ctr-o.
E.g. inserting opening and closing tags when a suitable plugin isn't present. Insert the opening and closing tag, jump back to command mode with ctrl-o, move backwards and you're ready to insert more text.
Can't speak for everyone, but I use this[1] keyboard most of the time, and it doesn't have a Caps Lock key to remap, but instead has Control where Caps Lock normally is. So using ctrl-[ is much easier than reaching up to the escape key.
Using Ctrl-[ is perfectly fine if that's convenient to you. Some people doe "inoremap jj <esc>" and double tap j to exit insert mode. If it's faster for you than pressing regular escape, it's an improvement, and thus good.
Politely, I'd consider rephrasing this in the future. Not everyone springs forth into the world with a 5kloc .vimrc. Everyone is incrementally learning from someone else at their own pace.