Adapting Vim movements (Lazyvim) to Colemak keyboard layout

Half of split keyboard with Colemak layout

TL;DR: I don’t recommend it. Use arrow keys instead.

Movements in Vim are great for QWERTY keyboard layout: h(left), j(down), k(up) and l(right). If you are using Colemak layout this does not sound ideal.

I switched to Colemak earlier in 2024. I was hesitant to remap these keys because I wasn’t sure if I would stick with Colemak, and if it may confuse someone else using my keyboard. However, I can now assert: 1) I am sticking with Colemak, and 2) no one else is touching my keyboard 😆. So, I thought it was time to remap those keys to make more sense of it.

My flavor of Nvim is Lazyvim. It is really easy to remap the keys. Just add your new configuration in ~/.config/nvim/lua/config/keymaps.lua. Restart nvim (or source init.lua), and that’s it.

Initially, everything seemed to work as expected, but it wasn’t long until I realized that this had conflicts with other plugins, e.g., Neo-tree.

After some research and stumbling upon this post https://noahfrederick.com/log/vim-colemak I realized that the change wasn’t worth it. It made more sense to use the arrow keys.

My arrow keys are nicely configured on a specific layer on my mechanical keyboard, using the same space of “ikjl” keys – up, down, left, right on QWERTY or “ueni” on Colemak.

Before attempting to remap keys I felt like I was cheating when using arrow keys. Not anymore. It makes a lot of sense for Colemak layout.

← Back to all posts