You can create a file named '.inputrc' in your home directory.
# want vi to be the default editor for readline
set editing-mode vi
# vi settings
$if mode=vi
# normal mode
set keymap vi-command
"j": beginning-of-history
"l": backward-char
"h": forward-char
"G": end-of-history
# insert mode
set keymap vi-insert
"jj": vi-movement-mode # remap escape
$endif
These are my mappings, with the exception of l
and h
. I switched those here, to show you how you can switch keys.
I don't know the Dvorak keys you want, just modify all those keys like you want.
man bash
describes all the possiblities.
bind
built-in command inbash
, or if you want the changes to be uniform across allreadline
apps, modify~/.inputrc
. – jw013 Dec 26 '11 at 20:42