Results 1 to 4 of 4
Hey, all i really need is a place to post this that i know google will cache. I've seen one other person on the Internet who had the exact same ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 03-01-2009 #1Linux Newbie
- Join Date
- Apr 2005
- Posts
- 235
[Solved] howto remap bash keys in vi mode
Hey, all i really need is a place to post this that i know google will cache. I've seen one other person on the Internet who had the exact same problem as I, we both use dvorak keyboards and wanted to use bash vi mode, but couldnt rebind our keys. To work this out i actually had to go through the source code of libreadline, so i want to save anyone else the pain.
To rebind the vi command mode keys, you have to first set the keyboard layout to vi-move (or vi, or vi-command) and then make your bindings. This may seem logical, but the documentation doesnt even hint that this may be a solution. My .inputrc file has the following
and also because i know that this will probably relate to only very few people, hello to the guy using a dvorak keyboard and wanting to use vi mode 4 years from nowCode:$if mode=vi set keymap vi-move "h": backward-char "t": prev-history "n": next-history "s": forward-char "k": vi-search-again $endif
- 03-01-2009 #2
excelent, I've been wondering about this. I've gotten so accustomed to the VI mode of doing stuff, it has been the one thing holding me back from using dvorak. Do you know how to rebind keys in vim text editor??
New to the internet, technical forums, or the hacker / open source community??
Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html
RHCE for RHEL version 5
RHCT for RHEL version 4
- 03-01-2009 #3Linux Newbie
- Join Date
- Apr 2005
- Posts
- 235
lol now thats easy
at this to your .vimrc. Actually i just remembered that i shifted all my movement keys one key to the right, so you may still need to adjust this.
Code:noremap t j noremap j t noremap n k noremap s l noremap k n noremap <s-t> 12j noremap <s-n> 12k
- 03-02-2009 #4
thanks, I've been wondering. Now I can maybe give dvorak a serious attempt.
New to the internet, technical forums, or the hacker / open source community??
Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html
RHCE for RHEL version 5
RHCT for RHEL version 4


Reply With Quote
