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

Re: Simple Tip of the Day



> bindkey -M viins '^O' copy-prev-word
>
> "^O" copy-prev-word
>
> allows me to type say
>
> > cp longfilename.tex ^O
> > cp longfilename.tex longfilename.tex
> which I then modify
>
> Your most useful binding?

Definately
bindkey "ESC-[A" history-search-backward
bindkey "ESC-[B" history-search-forward
(the values of the keys may change according to your terminal. I
should use a termcap to get it actually, except I'm too lazy to look
it up ; they are really up and down arrow)
Type the beginning of a command, and you can navigate through your
history lines that begin with what you typed. Exactly the same thing
as the default binding, except it's more powerful.
Only that messes up zed, because it only accepts up-line-or-history to
go up. I suggested a patch on the zsh-workers mailing list long ago
that Bart greatly improved, but it never made it into the CVS.

Also, these are set by default but not that much known, so I'd like to mention
bindkey "ESC-q" push-line
...which pushes the current line onto a stack and pops it when a new
prompt appears. Useful when you started typing something, then you
realize you have to execute some other command before the one you were
typing.
and
bindkey "ESC-." insert-last-word
...which inserts the last word of the previous command, exactly like
your ^O binding does with the current line.

--
J
"Toi, je te trouve pas la même tête que sur la page précédente" -- Wakamiya


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