[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash + dvorak + vi-mode key remap problem
From: |
Nils Grimsmo |
Subject: |
bash + dvorak + vi-mode key remap problem |
Date: |
Sat, 14 Aug 2004 18:33:50 +0200 |
User-agent: |
Mozilla Thunderbird 0.7.3 (X11/20040805) |
i am a vi-user, and after i switched to dvork, i've done quite a bit of
conf'ing. but i encountered a problem i couldn't find an obvious
solution to. the reason for using vi is the niceness of the home row,
and therefore i remap hjkl to htns. these keys are actually on key
_right_ of the original, meaning i now use four fingers for navigating.
i think this is way better than vi on qwerty.
the problem is getting readline in bash to play. you may put constructs
like this in your .inputrc:
$if mode=vi
h: backward-char
t: next-history
s: previous-history
s: forward-char
$endif
but this maps the keys for both insert-mode and command mode. the
problem is that you can only ask about the editing-mode ('vi' or
'emacs'), and not the current keymap ('emacs-standard', 'emacs-meta',
'emacs-ctlx', 'vi-command' or 'vi-insert').
from bash(1):
$if The $if construct allows bindings to be made based on the
editing mode, the terminal being used, or the application using
readline. ...
i want to specify something like ...
$if keymap=vi-command
...
$endif
... to let me navigate in command-mode.
does anyone know how to solve this, or will i have to patch readline?
btw: i don't get next-history or previous-history to work (i am running
bash 3). the usual arrow keys work, but C-p and C-n do not, and neither
anything i specify. are not these functions what i think they are?
klem fra nils
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?