Using VIM keys in shell (zsh or bash)


I want to use vim editing keys in my shell (zsh).

With bindkey -v i get VI keys, but i want visual and more advanced key shortcuts (like change inner word (ciw), which i use all the time)

btw, is superuser the right forum for this question?

Best Answer

As for the bash part in the title: You can put bash into vi mode by calling set -o vi (e.g. put that into your .bashrc). To bind functions to specific keys you have to use bind in bash. See help bind to list the available functions and examples of how to call it.

"Change inner word" is not in vi, but vim, so it is not available.