I want to use vim editing keys in my shell (zsh).
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?
As for the
bash part in the title: You can put
vi mode by calling
set -o vi (e.g. put that into your
To bind functions to specific keys you have to use
help bind to list the available functions and examples of how to call it.
"Change inner word" is not in
vim, so it is not available.
I know my answer is really late but if people are still searching for the same thing
For commands like
ciw and commands from
surround.vim use this zsh plugin
For visual mode use this zsh plugin http://bazaar.launchpad.net/~raybuntu/%2Bjunk/ZSH_stuff/annotate/head%3A/zle_vi_visual.zsh
Source them in your
.zshrc to enable them
In bash pressing
v (in command mode) opens vi(m) with the current content of the command line. You can now edit the line, using every feature of vi(m), and after quitting the line will be automatically executed.
Take a look at this article for a good introduction and a cheat sheet of vi command line editing mode.
I don't see that particular one, but these functions are documented in
man zshrle and some of them may be unbound. Search that file for the string "vi-" to find the available vi functions.