help / color / mirror / code / Atom feed
From: ml_zsh-workers@henk.geekmail.org
To: Oliver Kiddle <opk@zsh.org>
Cc: zsh-workers@zsh.org
Subject: Re: make vi-*-word widgets respect WORDCHARS
Date: Sat, 14 Jan 2023 13:31:06 +0100	[thread overview]
Message-ID: <20230114133106.5506f32a@frustcomp.hnjs.home.arpa> (raw)
In-Reply-To: <93248-1673370418.501141@Mcax.qXnI.VRgM>

[-- Attachment #1: Type: text/plain, Size: 1055 bytes --]

Hi Oliver

On Tue, 10 Jan 2023 18:06:58 +0100
Oliver Kiddle <opk@zsh.org> wrote:

> On 31 Dec, ml_zsh-workers@henk.geekmail.org wrote:
> > The vi-backward-kill-word widget does not seem to respect WORDCHARS:  
> > Is this a bug or intended?  
> It is intended. vi-backward-kill-word works in a vi compatible manner

Thank you. I found out that WORDCHARS actually comes from emacs. I thought it was zsh-specific. So it makes sense that these behave differently.

> No. But you can just bind Ctrl-W to backward-kill-word:
>   bindkey '^W' backward-kill-word

I did that and a few other adjustments to the keybindings now to get the behaviour I want:
bindkey -M vicmd 'w' forward-word
bindkey -M vicmd 'b' backward-word
bindkey -M viins '^W' backward-kill-word

# better word matching
autoload -U select-word-style
select-word-style normal
# these characters do _not_ separate words but are part of words
zstyle ':zle:*' word-chars '*?[]~;!#$%^(){}<>'

Now it seems to behave like I want it to.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

      reply	other threads:[~2023-01-14 12:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-31 21:04 ml_zsh-workers
2023-01-10 17:06 ` Oliver Kiddle
2023-01-14 12:31   ` ml_zsh-workers [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=20230114133106.5506f32a@frustcomp.hnjs.home.arpa \
    --to=ml_zsh-workers@henk.geekmail.org \
    --cc=opk@zsh.org \
    --cc=zsh-workers@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).