2

Like many people, I prefer a triangular or inverse-T navigation key format like IJKL instead of HJKL for ergonomic reasons. There's a pretty simple way to set this up in vim that I've used for years:

map h <insert>
map i <Up>
map j <Left>
map k <Down>

However, using text objects in visual mode conflicts with these keys — specifically inner objects, because they start with i. Further, plugins that rely on these objects (such as vimtex and others) then also have conflicts with the remapped i key.

Setting up IJKL with noremap h i instead of map h <insert> changes the inner object key from i to h which helps to some degree, but if you have plugins that use the standard inner text objects then there's a delay in visual mode every time you press i as vim waits to see if you're going to use the standard text objects as they're loaded from that plugin.

What is the best way to set up IJKL navigation without losing the functionality of inner text objects?

  • You could remap the plugin bindings. All good plugins should make that fairly easy. There's no real other way fix this I'm afraid. – Martin Tournoij May 16 '17 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.