Tip #1437: Using VIM with the Dvorak Keyboard Layout
tip karma |
Rating 19/10, Viewed by 1255
|
created: |
|
December 10, 2006 7:08 |
|
complexity: |
|
basic |
author: |
|
Jesse Read |
|
as of Vim: |
|
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 Qwerty layout for navigating (especially hjkl for example) and commands.
Adding these three lines to your .vimrc lets you do exactly that:
set langmap:s;;
set langmap=;z;
set langmap='q,\,w,.e,pr,yt,fy,gu,ci,ro,lp,/[,=],os,ed,uf,ig,dh,hj,tk,nl,-',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?
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.
<< wrap function calls in a print statement |
Using parameterized snippet inserts >>
Additional Notes
[email protected],
December 10, 2006 7:39
|
It can be just one line:
:set langmap='q,\,w,.e,pr,yt,fy,gu,ci,ro,lp,/[,=],os,ed,uf,
ig,dh,hj,tk,nl,-',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?,;z;,s:
Unfortunately I can't manage to escape the semicolon ;
in :help langmap it says escape with a backslash but that doesn't work. a ;z; works to map ; to z but s;; doesn't work to change s to ;
anyone??
I have just mapped s to a colon : instead which is almost good enough.
|
[email protected],
December 25, 2006 22:34
|
Doesn't work for me. As I'm french I've changed your mapping with mine but it silently failed, or I didn't manage to make the thing works. Really want a solution!
|
Anonymous,
December 27, 2006 8:03
|
I've been using a Kinesis keyboard mapped to Dvorak for a long time and I honestly think it's just as easy to navigate. I just think of navigation in terms of letters, not in terms of an invisible set of directions in the center of the keyboard. In fact, having the navigation keys split up between right and left hands divides some of the work and makes it even easier on me. Of course this keyboard also puts the arrow keys within easy reach too.
I can also type on a Qwerty keyboard, so I guess it's just never been a big deal for me...
|
|
|