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

Re: bindkey vi esc / k - beginning of line hatred



"Jerry Rocteur" wrote:
> 1) When I hit esc k to go back in my history, my cursor is at the end of the 
> line.. I hate this and can't live with
> it, how do I change it so that my cursor is at the beginning of the line so I
>  can type cw and change the command for
> example.

bindkey -M vicmd 'k' vi-up-line-or-history

(already bound to '-', but your fingers don't know that even if you do).

> 2) When I hit esc / xyz to search through my history for soemthing, nothing i
> s echoed to the screen. That is mildly
> annoying.

You should get a prompt "?" and the letters you type immediately below
the line.  Do you mean you want incremental search behaviour, with
matching lines appearing on the command line as you type?  For that you
need to pick a key and bind history-incremental-search-backward to it,
for example:

bindkey -M vicmd '^R' history-incremental-search-backward

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



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