Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I am using vi-editing-mode on Bash. According to man readline, there are a couple of default binding keys working on vi-editing-mode. Some keys work well, but some other default keys do not work.

For example, man readline says,

VI Command Mode functions
...
         "C-E"  emacs-editing-mode
...

But bind -p on my linux box says that 'emacs-editing-mode` is not bound on any key.

$ bind -p | grep emacs-editing
# emacs-editing-mode (not bound)

Is this a normal situation? How to turn on all default binding keys of vi-editing-mode on bash? Do I have to bind keys manually on .inputrc?

share|improve this question

1 Answer 1

Bash modifies a few default readline bindings including this one. The code is in the initialize_readline function in bashline.c.

/* In Bash, the user can switch editing modes with "set -o [vi emacs]",
   so it is not necessary to allow C-M-j for context switching.  Turn
   off this occasionally confusing behaviour. */

The mode-switching keys are the only ones that are unbound. Some additional keys are bound (e.g. for bash-specific completion like M-$ to complete variable names).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.