Vim Tips Wiki
Advertisement
Tip 1390 Printable Monobook Previous Next

created November 17, 2006 · complexity basic · author Jesse · version 5.7


When one switches to the Dvorak keyboard and uses Vim it becomes difficult to use the standard (h,j,k,l) movement keys. This is a great way to have the same movement locations and retain all of the functionality. There are also a few added benefits, that can be used. Add this to your vimrc:

The fixes for what is broken

  • Delete 'd' -> Junk 'j'
  • Next 'n' -> ???? 'l'
  • Previous 'N' -> ? 'L'

There were also some changes for familiarity, 's'/'S' can be used to access command mode (the old location of the :, which still works).

Added Benefits

  • End of line '$' -also- '-'
  • Beginning of line '^' -also- '_'
  • Move up 8 'T'
  • Move down 8 'H'
  • Next window <C-w><C-w> -also- 'N'
  • Swap windows <C-w><C-r> -also- 'D'
" Dvorak it!
no d h
no h j
no t k
no n l
no s :
no S :
no j d
no l n
no L N
" Added benefits
no - $
no _ ^
no N <C-w><C-w>
"no T <C-w><C-r>
no H 8<down>
no T 8<up>
no D <C-w><C-r>

Comments

I used to use something very similar to this, but lately I've felt better off just using the default keymappings under Dvorak. When I used a keymapping file for basic movement commands, I quickly became dependent on it, and I'd be unable to accomplish even simple Vim tasks under Dvorak without my handy mapping.


Agreed: h is left of the l, on the same hand; jk are adjacent. It's actually pretty convenient to scroll up/down with the left hand using the default layout. If Dvorak is what you used before you found Vim, it works just fine with the default bindings!

I think using :keymap dvorak is probably a better way to retain default 'nethack-style' movement though.


Advertisement