Vim Tips Wiki
Advertisement
Tip 1437 Printable Monobook Previous Next

created December 10, 2006 · complexity basic · author Jesse Read · version 6.0


Users of Vim and users of the Dvorak Keyboard are generally both interested in efficiency, yet unfortunately using the two together is often considered problematic. We want to type with the efficiency of the Dvorak layout but use the default vim layout for navigating (especially hjkl for example) and commands.

You can continue using the familiar well-thought-out qwerty layout for navigation and commands but when you enter insert mode you will be in Dvorak mode.

This also means you don't have to continually switch back and forth between X layouts with xmodmap.

Adding one of the following line to your vimrc lets you do exactly that.

dvorak to qwerty

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?

dvorak.fr to azerty

Here is a mapping for dvorak.fr to azerty :

set langmap=:a,àz,ée,gr,.t,hy,vu,ci,mo,kp,è^,z$,oq,as,ud,ef,bg,fh,sj,tk,nl,dm,wù,ù*,ç<,'w,qx,\,c,iv,yb,xn,r\,,p:,j!,l;;,?A,ÀZ,ÉE,GR,.T,HY,VU,CI,MO,KP,Ȩ,Z£,OQ,AS,UD,EF,BG,FH,SJ,TK,NL,DM,W%,Ù*,Ç>,'W,QX,\\;C,IV,YB,XN,RG,L.,P/,J§,/&,+é,*',=(,(è,`_,)ç,"à,[),]=,°{,+},\-,-"

Comments

Note This won't change multi-key shortcut like <c-v>, even in normal mode.

Note to Dvorak users learning Vim Many Dvorak users have no problem learning the normal Vim commands with a Dvorak layout. The up/down movement keys are on the left hand and the left/right keys on the right hand, but most other keys are simple mnemonics or just as easy to access in Dvorak. Don't let Dvorak be a barrier to learning Vim just because you don't want to remap everything to get started. Just give it a chance first!


Advertisement