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

Re: End of line instead of beginning of line

On Fri, Oct 16, 2009 at 12:37:43PM +0200, Tommi Airikka wrote:
> In vi-mode, is there any way to get the cursor directly to the end of
> the line (insert mode) when pressing the up arrow for history, just by
> changing in my local .zshrc?
> It's really annoying that it defaults to the beginning of the line.

  Do a search for up-line-or-history in zshzle(1); that will tell youy
why this state of woe exists.

  I use something like

autoload -Uz up-line-or-beginning-search
autoload -Uz down-line-or-beginning-search
zle -N up-line-or-beginning-search up-line-or-beginning-search
zle -N down-line-or-beginning-search down-line-or-beginning-search
bindkey -v
bindkey "^[[A" up-line-or-beginning-search
bindkey "^[[B" down-line-or-beginning-search

Perfect?  Probably not...

Dr. David Evans                                 David.Evans@xxxxxxxxxxxx
Research Associate                        http://www.cl.cam.ac.uk/~de239
Computer Laboratory, University of Cambridge

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