Hi all I have thought it would be nice to have a vim-a-like indicator of whether or not you are insert or command mode when using the vi line editting mode for a long time now. In a burst of enthusiasm I have put something together over the last couple of days (attached). However it's not quite as nice as it might have been and I have run into a few annoyances along the way. Initially I was planning to have the indicator in the prompt. However AFAICT once the prompt has been displayed it is cached, so even if you for zsh to redraw it (I tried various things like "zle redisplay", "zle push-input; zle get-line", "zle -R") it just redraws the old one. Did I miss a way to do this? Is there a reason why it shouldn't be possible to pipe something into source? Or another way to do it without a temporary file? With the script attached, if I paste a command in then only the first character is visible until I press ^R. If I type something else first then it works fine (even if I first delete what I typed!). Perhaps this is a bug? I also couldn't find a way to set the statusbar after accepting a command. zsh -M complains it's not being called from a widget if I call it from precmd. Finally I would welcome any comments/criticisms on the code! Thanks Ian