How to change keys in normal Vim mode, and not just reassign them?

I use Dvorak, so in my .vimrc:

no tj no nk no sl no ln no jt no ks 

which displays directional keys back to the right side of the home bar.

This usually works pretty well, with the exception of plugins. For example, I cannot navigate using up and down in the NERDTree plugin because it does something else.

Is there a way for me, and not just reassign the keys, to tell Vim to consider pressing t in normal mode to translate j into the press, no matter what context or plugin?

It seems I vaguely remember the vim command to use one key to another, but I can not find it.

+4
source share
2 answers

I found what I was looking for:

 set langmap=tj,nk,sl,ln,jt,ks 
+3
source

It might just be worth exploring the location of the Dvorak for keys. hjkl move, but (imho) not in such a way as to prevent their effective use. h and l are the index and little finger on the right, j and k are the middle and the index on your left.

It takes some time to reassign your brain, but most of the Vi keyboard layout is mnemonic, so it's easier than it could be (for example, with emacs, which is pretty Dvorak hostile IMHO).

+2
source

Source: https://habr.com/ru/post/1369524/


All Articles