zsh-users
 help / color / mirror / code / Atom feed
From: Jean Chalard <jean.chalard@gmail.com>
To: zzapper <david@tvis.co.uk>
Cc: zsh-users@sunsite.dk
Subject: Re: Simple Tip of the Day
Date: Fri, 28 Oct 2005 20:32:12 +0900	[thread overview]
Message-ID: <fb6be96e0510280432j6ede2421wec5d1b8747f149f2@mail.gmail.com> (raw)
In-Reply-To: <ci14m1hm45ig6umsu2v0tkini1gp0bad3r@4ax.com>

> 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

  reply	other threads:[~2005-10-28 11:32 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-28 11:11 zzapper
2005-10-28 11:32 ` Jean Chalard [this message]
2005-10-28 15:25   ` Bart Schaefer
2005-10-28 17:40     ` Jean Chalard
2005-10-28 15:53   ` zzapper
2005-10-28 11:47 ` Hannu Koivisto
2005-10-28 12:26   ` Nikolai Weibull
2005-10-29 12:37   ` Konstantin Sobolev
2005-10-29 14:52     ` Christian Taylor
2005-11-01 16:55       ` run-help and \cmd (was: Simple Tip of the Day) Vincent Lefevre
2005-11-01 18:02         ` Peter Stephenson
2005-11-01 18:23           ` Peter Stephenson
2005-11-01 18:55           ` Vincent Lefevre
2005-10-28 20:08 ` Simple Tip of the Day DervishD
2005-10-30  5:10 ` Philippe Troin
2005-11-01 16:58   ` Vincent Lefevre
2005-11-30 20:32 Simple Tip of The Day zzapper
2005-11-30 23:27 ` Przemyslaw Gawronski
2005-12-01 20:38 Simple Tip of the Day zzapper
2005-12-02  1:09 ` Vincent Lefevre
2005-12-02  9:13   ` Thorsten Kampe
2005-12-02 12:49     ` Mikael Magnusson
2005-12-02 19:20       ` zzapper
2005-12-03 20:28         ` zzapper
2005-12-03 22:08           ` Mikael Magnusson
2005-12-03 22:20             ` zzapper
2005-12-04  1:32               ` Mikael Magnusson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fb6be96e0510280432j6ede2421wec5d1b8747f149f2@mail.gmail.com \
    --to=jean.chalard@gmail.com \
    --cc=david@tvis.co.uk \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).