I\'m always little bit confused when bash in vi-mode is switched to insert-mode, because it doesn\'t give any tip about used mode (command or edit). Is there any way to dist
in /etc/inputrc (or ~/.inputrc) add this:
set show-mode-in-prompt on
this will prefix your prompt with + while in insert-mode, and : while in command mode in bash 4.3
EDIT: in the latest version of bash 4.4, you will instead get a prompt prefixed with "(ins)" or "(cmd)" by default. but, you can change that:
set vi-ins-mode-string "+"
set vi-cmd-mode-string ":"
also, you can use color codes like '\e[1;31m', but surround them with '\1' and '\2' to keep readline happy:
set vi-cmd-mode-string "\1\e[1;31m\2:\1\e[0m\2"