6 ms·
I continue to use 'hjkl' to navigate in vi(m) because using the arrow keys requires me to move my whole arm. This is an awkward movement that requires time for
by scott_s 14y ago
I continue to use 'hjkl' to navigate in vi(m) because using the arrow keys requires me to move my whole arm. This is an awkward movement that requires time for my fingers to find the arrow keys. When using 'hjkl' to navigate, my right hand is always on home row, ready to either navigate or start typing. When typing in non-vi text boxes (such as this one), I do this movement, but I don't like it.
I do have an inefficiency: I move my hand for the escape key (which I should remap to caps lock, but I've never gotten around to it in the past decade), but I pivot at the elbow. It's far less awkward.
- ephemient 14y agoAfter switching between keyboards with Esc in different places, I've learned to use Ctrl-[ instead. Can hit it without moving that far, and it works just as well in GVim as it does in all terminal programs. The only downside is being confused when nothing happens in a browser...
- pestaa 14y agoI learnt that `Ctrl-W` removes a whole word backwards in vim and the terminals. The only downside is being confused when
- weaksauce 14y agoTry: inoremap jj <Esc> In insert mode you just press j twice and you get out of insert mode. This is my favorite key remap in vim. You can put that in your .vimrc file or just try it out from the command bar.
- scott_s 14y agoIt's not the act of doing the remapping. It's accepting that I'll have to retrain my brain.
- ImprovedSilence 14y agoI started using inoremap jk <Esc> I'm not sure why, but I found it to be more fluid for me?
- rawland 14y agoinoremap jj <Esc> Same solution here. This favors people who tend to move from top to bottom during skimming a piece of code utilizing the j-key to move further down, which then let's you automagically exit EDIT-mode. Happens to me every fourth/fifth time. Earlier it was more often. However, as skills develop I increasingly rarely use the hjkl-keys. These days vim is placed at the end of a git/grep toolchain and most likely I tend to "/\v" for something or move more like "45j" directly to the place in focus (relativenumbers are your friend). Being in a row the natural tendency now is to jump with "f" or "F" and repeating with ";" if necessary. If you passed this milestone already, your opinion is highly welcome!
- weaksauce 14y agoI like to use hjkl for very short moves, wb for most moves in a sentence, "IA" for insert moves to the start or end of a line. I don't find f to be that useful because I don't like the thought required to figure out what letter I want. I guess it's just a personal preference though. larger moves are a mix of the {}() and /\v if I know what I am looking for by name. c-f c-b is nice if I am just browsing the code.
- mateuszf 14y agoYou could use Ctrl+C which works great for getting out of insert mode. Also Ctrl+J can be used instead as Enter. It also does work great in bash/zsh. It took me some time to switch but it was totally worth it. Caution: Switching caps lock with control was needed as prerequisite.
- qu4z-2 14y agoThe downside of ^c is that it doesn't trigger an InsertLeave event or abbreviations. Which can be a pain, or exactly what you want, depending on the occasion.
- s00pcan 14y agoRemap caps lock to control and use ^c or ^[
- jvm 14y agoRemap caps lock to escape. After I did this I realized Esc is a really useful key in a wide variety of contexts.
- kmm 14y agoOne of the best ideas I ever had. Caps Lock is one of the biggest keys on my keyboard and close to the rest. It would be a waste to use it for a single, rarely-used function.
- mattengi 14y agomake capslock to contorl, then use xcape https://github.com/alols/xcape https://github.com/alols/xcape now capslock does both ctrl and escape best settings ever!
- dredmorbius 14y agoCapslock is already ctrl. Now, I could dmap ctrl-l to esc. But I'm so used to the high-left pivot for 'esc' on Thinkpad keypads (and it's a tall key making for an easier target) that it's not worth the bother.