Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make Vim use Dvorak keybindings ONLY in insert mode?

I would like to use the Dvorak layout when I am typing in Vim. However, I would like all of my shortcuts to stay the same (behave as if keyboard is Qwerty in command mode). I have tried using this:

set langmap=q',e.,rp,ty,yf,ug,ic,or,pl,[/,]=,aa,so,de,fu,gi,hd,jh,kt,ln,\\;s,'-,z\\;,xq,cj,vk,bx,nb,mm,.v,/z,-[,=],Q\\",W<,E>,RP,TY,YF,UG,IC,OR,PL,{?,}+,AA,SO,DE,FU,GI,HD,JH,KT,LN,:S,"_,Z:,XQ,CJ,VK,BX,NB,MM,<W,>V,?Z      

to map my qwerty keys to dvorak while in insert mode, but I found that it interfered with some of my shortcuts. I would like to do this while keeping my keyboard mapped to qwerty on the rest of my OS (Windows 7). How can I achieve this with Vim? What does langmap actually do? (had trouble finding documentation)

It would be nice if the keyboard was dvorak in search mode, but that's more of an added bonus.

like image 970
Gordon Gustafson Avatar asked Dec 24 '12 19:12

Gordon Gustafson


1 Answers

I would like to do this while keeping my keyboard mapped to qwerty on the rest of my OS (Windows 7)

– so just use :set keymap=dvorak (dvorak.vim may be found in default Vim configuration on Ubuntu in vim73/keymap/, it must be available on Windows too). It does what you describe: Dvorak method is used in insert mode and search mode.

like image 146
Dmytro Sirenko Avatar answered Sep 30 '22 12:09

Dmytro Sirenko