To use the Emacs transpose-words function in vi mode I have the following .inputrc:
$if mode=vi
bind Control-b: transpose-words
$endif
Unfortunately it only works in "insert" mode. What is the trick to make it work in both "insert" and "command" modes?
I tried to use set keymap vi-command in the file, but it has no effect.
$if mode=vi
set keymap vi-command
bind Control-b: transpose-words
$endif