Can't configure VIM for Dvorak keymap

3


Could someone help me to configure Dvorak keymap for VIM? I want to configure my Dvorak keymap to work in VIM, but I want to leave QWERTY keys in navigation/visual mode. (hjkl for navigation and etc.). I have tried to add .vimrc file to my HOME folder and write key map from http://vim.wikia.com/wiki/Using_Vim_with_the_Dvorak_keyboard_layout to it:

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,<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?

but navigation doesnt work.
Any ideas?
OS: Mac OS Yosemite

LiveReload

Posted 2015-05-05T15:02:51.487

Reputation: 18

I'm pretty sure that langmap should work...maybe you have a plugin or mapping interfering? Try setting 'langnoremap'. I assume "navigation does not work" refers to hjkl, but in what way do they not work? Do they all have no effect at all? – Ben – 2015-05-19T21:01:33.783

Answers

1

Honestly, I tried a ton of things and finally decided to just go without any changes. I trained myself to think of shortcuts as their letters not their position on the keyboard... So a 'j' is a j not the location of the 'j' key in a qwerty keyboard but the actual letter 'j' in dvorak i.e. the 'c' key. It works really well for me and I can touch type without thinking of key positions but rather in letters - no mental context change.

PS: I only do this for VIM. For other tools, I use Dvorak-to-Qwerty remapper. I hope this helps.

Emad

Posted 2015-05-05T15:02:51.487

Reputation: 2 669

0

You can consider to map the navigation keys in normal mode. For example, if I want to move the "hjkl" keys to "qwer" I can write this in the .vimrc file:

nmap q h
nmap w j
nmap e k
nmap r l

This is probably not the solution you're searching for, but I think it may be a valid workaround

Andrea Carron

Posted 2015-05-05T15:02:51.487

Reputation: 736

Thanks for feedback Andrea! Works good to me! I can configure all buttons like I want! Thanks! – LiveReload – 2015-05-06T09:08:47.527