From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28856 invoked from network); 12 Oct 2003 20:12:17 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 12 Oct 2003 20:12:17 -0000 Received: (qmail 23099 invoked by alias); 12 Oct 2003 20:12:03 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6695 Received: (qmail 23050 invoked from network); 12 Oct 2003 20:12:02 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 12 Oct 2003 20:12:02 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.3.58.249] by sunsite.dk (MessageWall 1.0.8) with SMTP; 12 Oct 2003 20:12:2 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id h9CKC0619799 for zsh-users@sunsite.dk; Sun, 12 Oct 2003 13:12:00 -0700 From: Bart Schaefer Message-Id: <1031012201200.ZM19798@candle.brasslantern.com> Date: Sun, 12 Oct 2003 20:12:00 +0000 In-Reply-To: <20031012183111.795968542@pwstephenson.fsnet.co.uk> Comments: In reply to Peter Stephenson "Re: delete-word does not delete the entire word..." (Oct 12, 7:31pm) References: <20031012183111.795968542@pwstephenson.fsnet.co.uk> X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh Users Subject: Re: delete-word does not delete the entire word... MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Oct 12, 7:31pm, Peter Stephenson wrote: } } If you have 4.1, much of the work is done for you; see the description } of match-words-by-style in the zshcontrib manual. [...] } A side effect is that you can decide using styles what constitutes a } word, as described in the same section of the manual. I almost mentioned the -match functions, but decided not to because the manual section for them has no examples of the corresponding styles. } [ delete-whole-word ] : } } emulate -L zsh } setopt extendedglob Why does this need extendedglob? } # 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. It's clear from kill-word-match that BUFFER edits are not automatically propagated to CUTBUFFER. Which makes sense ...