Question

Hi!

For about 3 last weeks, I have been using Vim. I must say, I love the navigation keys on the home row!
A week ago I switched to Dvorak, and the new location of the movement keys, simply doesn't let me use Vim. It's terrble.
So, I wonder, is there a way to keep movement keys in Dvorak, in the same location as in qwerty?

I don't want to remap keys, as that would be super-confusing. One way I can think of is to assign the function i.e go up one line from key k to t.

So I could have my movement keys in dvorak(d h t n) layed out as in qwerty (h j k l)
Is it possible? How can I do that?

Was it helpful?

Solution

I don't want to remap keys, as that would be super-confusing

You probably want to remap keys, but just in Vim. However the fine people over at vim.wikia.com doesn't think this is such a good idea.

One alternative, as mentioned in the linked article, is to use dvorak in insert mode, and qwerty-position of binds in normal mode, i.e. w = ", i = c etc.

set langmap='q,\,w,.e,pr,yt,fy,gu,ci,ro,lp,/[,=],aa,os,ed,uf,ig,dh,hj,tk,nl,s\;,-',\;z,qx,jc,kv,xb,bn,mm,w\,,v.,z/,[-,]=,\"Q,E,PR,YT,FY,GU,CI,RO,LP,?{,+},AA,OS,ED,UF,IG,DH,HJ,TK,NL,S:,_\",:Z,QX,JC,KV,XB,BN,MM,W<,V>,Z?

-

One way I can think of is to assign the function i.e "go up one line" from key k to t, so I could have my movement keys in dvorak(d h t n) layed out as in qwerty (h j k l) Is it possible? How can I do that?

Remember that doing such a thing could break other keys, I can't really tell as it's hard without actually trying/comparing each key. You could however remap all of those keys to custom positions if you'd want to using nnoremap etc.

A basic remapping would be just to remap the home row like this.

nnoremap d <Left>
nnoremap h <Down>
nnoremap t <Up>
nnoremap n <Right>

All in all I don't think it's such a good idea to combine two keyboard layouts, so just remapping home row is probably the safest, and then learn that e etc. has custom positions compared to qwerty.

These problems is why I never bothered to switch to Dvorak og Colemak, because I'd have to relearn all those binds that I have in my muscle memory, for a new vim user it might not be such a big issue though, so you're lucky that way!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top