Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Vi ZLE bindings: status in prompt?



On Apr 21,  7:24am, Thomas Köhler wrote:
}
} > some way to add the Vi mode to the prompt.
} 
} I have such a thing implemented. You can have a look at my .zshrc
} to see how it works:
} 
} http://gott-gehabt.de/800_wer_wir_sind/thomas/Homepage/Computer/zsh/zshrc

That relies on being able to reposition the cursor to where the prompt
was last drawn, and write something new over it, without the real prompt
being reprinted.  Which is clever, if not entirely reliable.

In recent CVS snapshots there's a built-in widget called "reset-prompt"
that can be used to cause zle to redraw the true prompt.  That plus
the readonly KEYMAP parameter can probably be caused to do the right
thing, though you've still got to redefine all the vi widgets to call
reset-prompt on every mode change.



Messages sorted by: Reverse Date, Date, Thread, Author