help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Daniel Shahaf <d.s@daniel.shahaf.name>
Cc: Zsh Users <zsh-users@zsh.org>, "chiasa.men" <chiasa.men@web.de>
Subject: Re: ctrl w behaviour: jump in front of separating characters?
Date: Wed, 25 Aug 2021 12:29:36 -0700	[thread overview]
Message-ID: <CAH+w=7Zh_XJpq=nRL-jH6fpa-7soUo46QcLC8T-VtidNHkyRvA@mail.gmail.com> (raw)
In-Reply-To: <85f1bc6c-7bab-400e-8f6c-444cf2892f8d@www.fastmail.com>

On Wed, Aug 25, 2021 at 11:43 AM Daniel Shahaf <d.s@daniel.shahaf.name> wrote:
> Bart Schaefer wrote on Tue, 24 Aug 2021 22:32 +00:00:
> > Writing your own widget:
> >
> > backward-kill-word-space() {
> >   backward-kill-word-match
> This should have read «zle backward-kill-word-match».

Actually that isn't necessary, backward-kill-word-match can be run as
a function as long as it is in the context of another widget, it
doesn't have to be run as a widget on its own.

> >   while [[ $LBUFFER = *' ' ]] &&
> >     zle backward-delete-char
> Curious: Any particular reason to prefer this over «LBUFFER=${LBUFFER% }»?

I didn't confirm, but I believe the latter doesn't include the space
in the undo list and kill ring?

      reply	other threads:[~2021-08-25 19:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-24 16:04 chiasa.men
2021-08-24 22:32 ` Bart Schaefer
2021-08-25 18:43   ` Daniel Shahaf
2021-08-25 19:29     ` Bart Schaefer [this message]

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:

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

  git send-email \
    --in-reply-to='CAH+w=7Zh_XJpq=nRL-jH6fpa-7soUo46QcLC8T-VtidNHkyRvA@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=chiasa.men@web.de \
    --cc=d.s@daniel.shahaf.name \
    --cc=zsh-users@zsh.org \


* 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


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).