Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Problem with motion commands defined using match-word-by-style used with vi-delete
- X-seq: zsh-users 10164
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "Zsh Users" <zsh-users@xxxxxxxxxx>
- Subject: Re: Problem with motion commands defined using match-word-by-style used with vi-delete
- Date: Fri, 21 Apr 2006 22:00:35 -0700
- In-reply-to: <dbfc82860604211610x70a12466j7eb5bb6758e85c0d@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <dbfc82860604211610x70a12466j7eb5bb6758e85c0d@xxxxxxxxxxxxxx>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author