0

I am using Debian 9 with the Bash shell as default. This is my ~/.inputrc file.

set editing-mode vi
set show-mode-in-prompt on
set vi-ins-mode-string "+ "
set vi-cmd-mode-string "- "

# in vi-command mode
set keymap vi-command
Control-l: clear-screen
Control-a: beginning-of-line
# end-of-line is the only one that does not work.
Control-e: end-of-line
Control-k: kill-line
Control-u: backward-kill-line

# in vi-insert mode
set keymap vi-insert
Control-l: clear-screen 
Control-a: beginning-of-line
Control-e: end-of-line
Control-k: kill-line
Control-u: backward-kill-line

I have recently switched to using vi mode in my shell. However, I am already used to the emacs default keybindings and want to keep some of those as well. (In some cases they are more efficient to use in the shell.) All of the above are working except for Control-e: end-of-line in vi command/regular mode. Does anyone have ideas on how to get that one working?

By the way, the function names (after the colon) came from running bind -P.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.