From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17707 invoked from network); 22 Apr 2006 05:01:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 22 Apr 2006 05:01:02 -0000 Received: (qmail 20923 invoked from network); 22 Apr 2006 05:00:56 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 22 Apr 2006 05:00:56 -0000 Received: (qmail 13100 invoked by alias); 22 Apr 2006 05:00:48 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10164 Received: (qmail 13091 invoked from network); 22 Apr 2006 05:00:48 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 22 Apr 2006 05:00:48 -0000 Received: (qmail 19881 invoked from network); 22 Apr 2006 05:00:48 -0000 Received: from vms048pub.verizon.net (206.46.252.48) by a.mx.sunsite.dk with SMTP; 22 Apr 2006 05:00:46 -0000 Received: from torch.brasslantern.com ([71.116.76.26]) by vms048.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IY30062LXX8VT77@vms048.mailsrvcs.net> for zsh-users@sunsite.dk; Sat, 22 Apr 2006 00:00:45 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k3M50a3O007627 for ; Fri, 21 Apr 2006 22:00:44 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k3M50ZgO007626 for zsh-users@sunsite.dk; Fri, 21 Apr 2006 22:00:35 -0700 Date: Fri, 21 Apr 2006 22:00:35 -0700 From: Bart Schaefer Subject: Re: Problem with motion commands defined using match-word-by-style used with vi-delete In-reply-to: To: "Zsh Users" Message-id: <060421220035.ZM7625@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: Comments: In reply to "Nikolai Weibull" "Problem with motion commands defined using match-word-by-style used with vi-delete" (Apr 22, 1:10am) On Apr 22, 1:10am, Nikolai Weibull wrote: } } [...] $curcontext is set to zle:vi-delete, not, for example, } zle:forward-word-match. } } It seems that this issue can be quite hard to fix, considering how } vi-delete is currently implemented. But perhaps there's an easy } solution that I was unable to spot. Try applying this same small change to each of the *-match functions: --- 8< --- @@ -3,7 +3,7 @@ autoload match-words-by-style -local curcontext=":zle:$WIDGET" word +local curcontext=":zle:$WIDGETFUNC" word local -a matched_words integer count=${NUMERIC:-1} --- 8< --- I didn't actually try that because I'm not a vi mode user and I'm in a hurry :-/ but it seems like it should do the trick. If it doesn't, try ${WIDGETFUNC%-match} instead. } Until then I'm going to use my own vi-delete Creating a vi-delete-match function seems like the next best thing.