The $if mode=vi
conditional looks correct.
Read .inputrc into bash with:
bind -f ~/.inputrc
To read the bash help for bind
:
help bind
AFAIU, echo
is not a valid inputrc
command.
Here are the Bash readline docs: https://www.gnu.org/software/bash/manual/bashref.html#Readline-Init-File