[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug of readline's vi keybinding function
From: |
Linsong |
Subject: |
Re: bug of readline's vi keybinding function |
Date: |
Wed, 19 Apr 2006 11:24:44 +0800 |
User-agent: |
Mozilla Thunderbird 1.0.2 (X11/20050404) |
Chet Ramey wrote:
Hi,
Recently, I want to add some keybindings for vi mode's vi-insert
submode, I add the following lines into ~/.inputrc file:
set editing-mode vi
set keymap vi-insert
"\C-A" : beginning-of-line
"\C-B" : backward-char
"\C-F" : forward-char
"\C-E" : end-of-line
... ...
In fact, I put almost all the emacs key bindings into vi-insert submode,
since the default key bingdings of readline for vi-insert submode is too
weak. By this way, I want to get the benefits from the two world. But
it does not work, I have searched the web, but it is very difficult to
find useful resource about vi mode in readline.
It works fine when I try it. How exactly does it `not work'?
Chet
Hi, Chet
Thanks for your reply.
Here is my .inputrc file:
=======================================================
#"\e[3~": delete-char
# this is actually equivalent to "\C-?": delete-char
# VT
"\e[1~": beginning-of-line
"\e[4~": end-of-line
# kvt
"\e[H":beginning-of-line
"\e[F":end-of-line
# rxvt and konsole (i.e. the KDE-app...)
"\e[7~":beginning-of-line
"\e[8~":end-of-line
set meta-flag on
set convert-meta off
set output-meta on
# ignore case while completing
set completion-ignore-case on
# shut off the bell
set bell-style none
set editing-mode vi
set visible-stats on
set keymap vi-insert
"\C-A" : beginning-of-line
"\C-B" : backward-char
"\C-E" : end-of-line
"\C-F" : forward-char
=======================================================
After adding the keybindings, I open a new terminal(gnome Terminal 2.10.0),
input some text and press Ctrl+B, it does not work.
Am I doing something wrong?
Linux vincent 2.6.10-5-386 #1 Tue Apr 5 12:12:40 UTC 2005 i686 GNU/Linux
GNU bash, version 3.00.16(1)-release (i386-pc-linux-gnu)
BR
Vincent