qfc icon indicating copy to clipboard operation
qfc copied to clipboard

Binds don't work in vi-mode

Open ahills opened this issue 9 years ago • 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.

ahills avatar Jul 24 '15 20:07 ahills

Works for me in vi-mode, bash 4.3.39.

rafi avatar Jul 25 '15 09:07 rafi

Also works for me in vi-mode.

bash --version
GNU bash, version 4.3.33(1)-release (x86_64-apple-darwin13.4.0)

slowkow avatar Jul 25 '15 17:07 slowkow

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

pindexis avatar Jul 25 '15 22:07 pindexis

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?

ahills avatar Jul 26 '15 12:07 ahills

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.

slowkow avatar Jul 26 '15 12:07 slowkow

That would enable vi-mode for all my readline programs.

ahills avatar Jul 26 '15 12:07 ahills