Vim users - how are you using arrow keys?

I occasionally use vim, or vim-style bindings, and I’m finding myself having trouble switching between the HJKL-style to IJKL-style directions. I find HJKL hard to use outside of text-editor context.

Anyone else experiencing the same? Any workarounds or tips?

I just remapped the keys to Vim-style. For the mouse-cursor I have left the default although. But you could also remap those if you prefer. For me for the mouse cursor movement JKLI-bindings make sense and work. I have mapped PgUp and PgDn to the upwards and downwards motion of the strongest finger (middle finger for me), so use I-key for up and ,-key for down. I have used those mappings for years and very much like them. The UHK mappings for PgUp and Dn I find too hard to reach for such a heavily used function. At least for me.

Funnily I have remapped the lower, right 4 keys to arrows as well (for browsing and other tasks) and have even another arrangement there. Left/Right as a pair and Up/Down as the other pair. The reason is that this allows easily to use the reverse direction with the index and middle finger, which I use for both pairs. This is “browsing mode” and not touch-typing, where I of course use the Vim-style bindings.

1 Like

I remapped to vim as one of the first things I customized. hjkl is just the right things, my fingers aren’t going to learn differently. Also remapped mouse layer to match. I’ll admit I ALSO mapped wasd to the movement keys, but it turns out I never used that side. I mapped pgup/pgdn to B and F as well.

It’s mildly annoying that Bill Joy picked keys one-off from the default “home” finger position, but it’s been part of my typing for so long that either ijkl or jkl; doesn’t work for me. For many games, wasd is comfortable, but it doesn’t translate to the other hand for text input.

I really wish UHK offered their quality keycaps (especially the non-standard right-column) without side-printing that encodes the default keymap choices. I’ve replaced the keycaps on my 3 UHKs, but I’d be happier if i didn’t have to.

1 Like

Actually a while ago I had the same thought and tested with jkl;-keys. Very soon I switched back to the standard Vim-positions. Not because of the fingers were used to the Vim-bindings, but because I found that I find them better from an ergonomics/ comfort standpoint. With the default mapping the two strongest fingers are responsible for down/up. This as a pair is very handy to have on the two strongest digits. Then the right-arrow is on the L-key with the still relatively strong ring finger, while the (overused) pinky does not have to do anything. Sure you need to stretch to the H-key for left, but I mostly need down and right, which is than in better positions like when the often used right arrow would land on the pinky. Sure you could change the order, but then the direction would be even less intuitive.

I just ignore those which I have remapped, but still find the printing useful for some mappings which I keep at the original location, but do not use frequently (Pause, ScrlLck…). This is the same reason why I think printed keycaps are better than blank ones, although I never look at the keyboard while typing, just for “browsing” one-handed or the like it is helpful to be able to quickly see the position. Even when I know that my A is on the key with the print ‘S’ on it :wink:

Interesting, thanks for sharing! I wish I had remapped to hjkl off the bat when I got my UHK. Now I’ve gotten used to the arrow keys and since I don’t use vim as much as I used to, I’m a little fudged up.

I’d love to take a peek at either/both of your keymaps, if it’s easy enough to do and you don’t mind sharing.

try using hjkl keys on dvorak :slight_smile: I almost don’t use uhk arrows but when I do there’s no issue to distinguish it from dvorak hjkl

I use the left mod key (the one that’s not a key under where the space bar normally is) + hjkl. It required almost no retraining in my brain that way.

1 Like

Long story short: case buttons lead to vim hjkl…


Base layer, notice 7890 keys which together with trackball act as regular thumb trackball with buttons on 7890

  • 7890 keys map to mouse buttons, basic tab switching, new tab, close tab, and trackball-scrolling
  • mouse/caps button alone mirrors entire keymap… …so it is possible to write single-handedly.

Case buttons activate arrow keys:

  • A-insert is terminal paste shortcut

Case button + mouse/caps button activates mouse key layer

  • A-arrows, C-PgUp/Down are browser history and tab switching
  • C-T C-W are “new tab” “close tab”

Right “space” activates symbol/macro/Fkey layer:

  • top row are runtime macros (vim-like style), ~ key acts as vim Q (Q+key starts recording)
  • Emoji contains shortcuts to commonly used emoji alt codes, e.g. Emoji+c+r = cry, Emomji + h + r = heart, etc…
  • Bind allows rebinding part of the keymap:
    • Bind+a - maps arrows onto jilk, and regular escape on the mouse/caps key
    • Bind+m - maps the 7890 keys to regular mouse actions (this disables rocking gestures, middle-hold scrolling and middleclick simulation, but works reliably in games etc)
  • RGB allows switching backlight colour, e.g., RGB+r = red, RGB+y = yellow, RGB+n = warm white, RGB+f = functional…

And another keymap which realizes that mirroring setup, via holdKeymapLayer references…


If you have any questions, post them here: My configuration - mirroring setup, runtime macros, etc

5 Likes

Hi! It has been a long time since I’ve used vim professionally, so I’ve forgotten much of it…maybe all of it. I can see myself using it again. I do not have a UHK yet, but if I do order one, I’ve bookmarked this thread. There is a lot that I can learn from it. My personal thanks to all of you for creating and contributing to this.

I ended up switching my Vim configuration to a Colemak setup, which gave me the opportunity to move Vim over to an IJKL configuration.

I know that moving Vim away from HJKL is a serious pain, due to the amount of things one needs to remap, but if one want our needs to, then I think the end result (IJKL) is much nicer.

By chance, or by some kind of convergence, the UHK defaults for navigation (Home/End, arrow keys, Page Up/Down) were on the exact same positions as I had the corresponding navigation mapping set to in my Vim configuration (although there being even more mappings in Vim in that area).

I did the same(vim-style keys for the arrows). Indeed switching from vim to normal keys was weird so I wen’t all in. It was awkward for 1 day but then everything was great

Do you really use hjkl keys on dvorak? I just pulled it up in Agent because I’m not familiar at all with the layout, and my mind is blown.

This is amazing, thanks for sharing

1 Like

yeah, some people remap vim to have the same layout of hjkl keys on dvorak since vim was designed for qwerty, not for dvorak. but I figured I’d just teach my brain again. so it took a lot of pain but now I can finally natively use vim on dvorak without the need to remap anything / have custom configs (big deal for me)

1 Like

Sure, here are my current keymaps, with a disclaimer. I just have the UHK for a bit more than a week, so the keymaps are evolving.

I will make a new post, because discussion will likely be not about Vim style arrow keys.

1 Like

I did swap to hjkl, but I had this weird thing where my brain started to think it was in vim all the time, and of course, this caused problems.

I have it as IJKL now, and so my brain seems to consider it a different thing altogether and I’m not accidently hitting escape all the time, or typing ZZ at the end.

Actually, I find home/end so convenient, I use it in Vim sometimes now. I feel bad about that.

1 Like

I just use cursor keys (on the mod layer) in vim. I don’t bother with the hjkl mappings because my main layout is Colemak anyway, so those keys are not in any good location for cursor movement.

1 Like

Here’s my MOD layer

image

I remapped all the things to be mnemonically close to each other. Pg up and down are above normal Up and Down arrows, and Home and End are above the Left and Right

Besides that, I have pretty small fingers, so it’s more convenient for me to have Backspace and Enter on mod+, and mod+.

1 Like

Nice layout, left to BS you have place for Ctrl-BS, just an idea :slight_smile:

Following your idea I now have the following layer, trying to have the most used keys easy to reach: