Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: question about keybinding
- X-seq: zsh-users 6801
 
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
 
- To: Andy Spiegl <zsh.Andy@xxxxxxxxx>
 
- Subject: Re: question about keybinding
 
- Date: Fri, 21 Nov 2003 23:52:42 +0100
 
- Cc: ZSH User List <zsh-users@xxxxxxxxxx>
 
- In-reply-to: <20031121221510.GA18778@xxxxxxxxx> 
 
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
 
- References: <20031121221510.GA18778@xxxxxxxxx>
 
Andy Spiegl wrote:
> 
> I'm basically using the emacs-keybinding and have my wordchars set to:
>  WORDCHARS='*?_-.[]~=/&;!%^(){}<>+'
> 
> But sometimes I'd like to behave emacs-(back|fore)ward-word differently
> so that it doesn't jump over dots.  Let's say when I additionally press
> SHIFT together with meta-b.  I've been pondering but I can't think
> of a simple way to set it up so that the WORDCHARS setting changes
> depending on which key I press.
Write a widget and change WORDCHARS within it. For example, I use:
  tcsh-backward-word() {
    local WORDCHARS="${WORDCHARS:s@/@}"
    zle backward-word
  }
  zle -N tcsh-backward-word
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author