I swear sometimes I feel like I’m the only person in the world that thinks hitting the ESC key is easy and no big deal. Maybe it’s decades of doing it, and I don’t consider myself especially dexterous, but I never have any problem with it.
Yeah, I just slap in that general direction and it works fine. That’s the beauty of that corner location, still fairly close and very forgiving. (And I don’t want to use Caps Lock for that , Backspace on the other corner of the keyboard is far less convenient, that’s what I want Caps Lock to be.)
Vim Foot Pedal
101–110 of 134 posts
Re: Vim Foot Pedal
#102I recently took on pedal steel guitar. Which has both foot pedals and knee levers. Along with both hands (plucking and barring chords). It’s really changed the way I think about input methods. Pedals have always been a thing, but primarily for effects, not part of inputting notes. Those lazy knees weren’t doing anything!!
Re: Vim Foot Pedal
#103Sexy idea, but as someone who started using vi in 1987, a software solution seems way better. I map the seldom-otherwise-used key sequence jk to . If I were doing it over, kj would be slightly better, for times when I am Just Kidding. I do this in both .vimrc and .inputrc (using different syntax, sigh). My fingers generate the escape without thought. (As is true for tons of vim normal mode actions I use regularly.)
Both jk and kj appear in normal writing for me :( I briefly considered a foot pedal but it seems to me that foot dexterity is far lower than finger, meaning typing ihello is FAR faster than hello , not to mention that pedal travel is way longer. Of course you map esc to caps.
Re: Vim Foot Pedal
#104FTA: “Plus, there’s some ergonomic benefits to not having to strain one’s hand over to reach the ESC key.” Honest question: Is it that uncommon knowledge that Ctrl+[ is equivalent to ESC in vim default keybinds?
It's pure muscle memory after the first week or two, is obviously faster than fumbling around for ESC (which may move slightly between keyboards).
It works on every terminal, also on every keyboard, doesn't require customisation of your vim environment (compare to remapping CAPSLOCK) which is highly preferable if you're moving between ephemeral hosts and/or hosts you don't own or can't conveniently customise.
Re: Vim Foot Pedal
#105Earlier quoted context omitted.
Agreed. Most vim users swap esc with caps lock anyway, making it even easier to reach. I don't think pedals bring any significant ergonomic benefit, but pedal setups look cool nonetheless. Swapping keys isn't interesting and you can't write a blog post about it.
> Most vim users swap esc with caps lock anyway "Some", sure, but "most"? Not so sure about that. Besides, everyone knows what Ctrl is the One True Key™ in place of the Caps Lock and that only degenerate infidels map it to anything else.
Both my Ubuntu and OSX machines are setup so that just pressing Caps Lock alone = escape, and holding Caps Lock = control.
For the curious, to do this in OSX I use Karabiner + a "complex modification" (i.e. import a small JSON config). And for Ubuntu I use a few 'xcape' commands that autorun on startup.
Re: Vim Foot Pedal
#106I do really like the idea of tapping vs. holding caps lock mentioned in another comment here, though. I could probably get used to that instead.
Re: Vim Foot Pedal
#107I resolved this pain by making the Caps Lock key work as it should: tap for “Esc” and hold for “Control”. Then I took the Escape key and made it Caps Lock—it’s occasionally useful, but not nearly enough to warrant a home row position. You can do this with Karaniner Elements on macOS. There’s a way to do it on Windows too, but how escapes me at the moment.
I feel like people who think the "CTRL" key goes on the home row never pressed CTRL+Z, CTRL+X, CTRL+C or CTRL+V in their entire lives. Makes zero sense ergonomically to put the CTRL key on the home row. I tried it for about 0.05 seconds and after pressing CTRL+Z one time I knew it was not a good idea for me. pinky finger does not like pressing a key while being on a higher row than another finger also pressing a key.…
I remapped capslock to delete, and shift-capslock to capslock for the rare occasion I want to yell at my future self.
Re: Vim Foot Pedal
#108I resolved this pain by making the Caps Lock key work as it should: tap for “Esc” and hold for “Control”. Then I took the Escape key and made it Caps Lock—it’s occasionally useful, but not nearly enough to warrant a home row position. You can do this with Karaniner Elements on macOS. There’s a way to do it on Windows too, but how escapes me at the moment.
I feel like people who think the "CTRL" key goes on the home row never pressed CTRL+Z, CTRL+X, CTRL+C or CTRL+V in their entire lives. Makes zero sense ergonomically to put the CTRL key on the home row. I tried it for about 0.05 seconds and after pressing CTRL+Z one time I knew it was not a good idea for me. pinky finger does not like pressing a key while being on a higher row than another finger also pressing a key.…
Re: Vim Foot Pedal
#109I swear sometimes I feel like I’m the only person in the world that thinks hitting the ESC key is easy and no big deal. Maybe it’s decades of doing it, and I don’t consider myself especially dexterous, but I never have any problem with it.
Re: Vim Foot Pedal
#110FTA: “Plus, there’s some ergonomic benefits to not having to strain one’s hand over to reach the ESC key.” Honest question: Is it that uncommon knowledge that Ctrl+[ is equivalent to ESC in vim default keybinds?
The pairings are offset by 0100 in octal. The octal ordinal for escape is 033. 0133 maps to [ so ^[ (control-open-square-bracket) is equivalent to escape.
Some other common ones are: line feed/^J, backspace/^H, tab/^I, and end-of-transmission/^D. If you ever type “exit” to end a shell session you can do the same with ^D.
Similarly of course you don’t have keys for upper and lower case letters. You use the shift key for that, which shifts the code by 040 instead of 0100. Technically it’s down by 040 because while most keys are labelled in capitals their default behaviour is to send the lower case letter.