Binds don't work in vi-mode
Opened this issue · 6 comments
BASH_VERSION
is 4.3.33(1)-release. Pressing ^F just inserts ^F
. Running set -o emacs
causes qfc to work as expected.
Works for me in vi-mode, bash 4.3.39.
Also works for me in vi-mode.
bash --version
GNU bash, version 4.3.33(1)-release (x86_64-apple-darwin13.4.0)
When you type set -o vi
. Ctrl-f will be overridden by vi keybinding for that key-sequence(which is self-insert in this case).
So you have to resource .bashrc for it to works.
I guess that's your issue
Unfortunately, set -o vi
is in my profile at the very beginning, and the bind is added at the end of my .bashrc
. Setting the mode to emacs makes it work right away without sourcing again, and setting it back to vi turns it off. How can I force the bind to apply to vi-mode?
The way I set vi-mode is by editing my Readline init file ~/.inputrc
file like this:
set editing-mode vi
See more here: https://www.gnu.org/software/bash/manual/html_node/Readline-Init-File-Syntax.html#Readline-Init-File-Syntax
This way, you can avoid executing set -o vi
in your ~/.bashrc
file.
That would enable vi-mode for all my readline programs.