From: Peter Stephenson <pws@csr.com>
To: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: delete-word does not delete the entire word...
Date: Mon, 13 Oct 2003 11:04:08 +0100 [thread overview]
Message-ID: <3762.1066039448@csr.com> (raw)
In-Reply-To: "Bart Schaefer"'s message of "Sun, 12 Oct 2003 20:12:00 -0000." <1031012201200.ZM19798@candle.brasslantern.com>
Bart Schaefer wrote:
> I almost mentioned the -match functions, but decided not to because the
> manual section for them has no examples of the corresponding styles.
Look in select-word-style, which is the simple interface, not requiring
explicit styles set by the user. If you'd like the styles there shown
in the manual, too, fine.
> } [ delete-whole-word ] :
> }
> } emulate -L zsh
> } setopt extendedglob
>
> Why does this need extendedglob?
It probably doesn't, but I turn that on as a matter of course, since
otherwise it's not there when I need it, or I've made it difficult to
turn it on later, etc. In any case, whenever I use patterns I assume
extended globbing is present even if I don't use it.
> } # Move the cursor and delete the block in one go for the
> } # purpose of yanking.
> } (( CURSOR = pos1 ))
> } BUFFER="${BUFFER[1,pos1]}${BUFFER[pos2,-1]}"
>
> I'm a little puzzled by that comment. This is delete-whole-word, not
> kill-whole-word, so there shouldn't be any expectation of yanking ...
> and in fact when I try it I can't yank the word that was deleted.
Yes, I meant `undo' rather than yank. You should find it undoes in one
go.
> It's clear from kill-word-match that BUFFER edits are not automatically
> propagated to CUTBUFFER. Which makes sense ...
Indeed, there's a complete separate interface as used in the other
-match functions. (I should have called this one
delete-whole-word-match for consistency.)
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070
**********************************************************************
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential
and/or privileged material.
Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is
prohibited.
If you received this in error, please contact the sender and
delete the material from any computer.
**********************************************************************
next prev parent reply other threads:[~2003-10-13 10:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-11 12:10 DervishD
2003-10-11 17:36 ` Bart Schaefer
2003-10-11 19:51 ` DervishD
2003-10-11 21:00 ` Bart Schaefer
2003-10-12 8:57 ` DervishD
2003-10-12 16:32 ` Bart Schaefer
2003-10-12 17:05 ` DervishD
2003-10-12 18:31 ` Peter Stephenson
2003-10-12 20:12 ` Bart Schaefer
2003-10-13 10:04 ` Peter Stephenson [this message]
2003-10-13 9:09 ` DervishD
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=3762.1066039448@csr.com \
--to=pws@csr.com \
--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).