Closed choffee closed 9 years ago
I did a push just now that should fix it. I just defined C-a to be beginning-of-line in bash vi insert mode. (And added the zsh equivalent.)
:xiki/bin/.xsh : bind -m vi-insert "\C-a":beginning-of-line
Do you think bash vi key users wil object to having C-a go to the beginning of the line in insert mode? If so, I could map beginning-of-line to a more obscure char, like M-C-b or something, and then use that instead of C-a.
Cool. That works great.
C-A in vim is assigned to increase the number under the cursor but that is not supported in bash so that should be fine.
What about tmux users who remap C-b to C-a as leader ?
Hi
In the .xsh file it sets Ctrl-R to xsh-r using
bind \"$xiki_reverse_key'" "\C-axsh -r \n"' This assumes that \C-a moves to the start of the line. If you use bash in vi mode, using set -o vi, then it fails.
I did trying setting it with an alternate shortcut bind \"$xiki_reverse_key'" "\e[H xsh -r \n"' But that only sort of works, you have to press crtl-R twice quickly.
There could be a separate set of shortcuts if bash is in vi mode. bind \"$xiki_reverse_key'" "\e^ixsh -r \n"' That seems to work okay. It does feel a little hacky though. Maybe the \C-a bit could be replace with a function in some way?