zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: Andy Spiegl <zsh.Andy@spiegl.de>
Cc: ZSH User List <zsh-users@sunsite.dk>
Subject: Re: question about keybinding
Date: Fri, 21 Nov 2003 23:52:42 +0100	[thread overview]
Message-ID: <1838.1069455162@athlon> (raw)
In-Reply-To: <20031121221510.GA18778@spiegl.de>

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


  reply	other threads:[~2003-11-21 22:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-21 22:15 Andy Spiegl
2003-11-21 22:52 ` Oliver Kiddle [this message]
2003-11-22  1:05   ` Andy Spiegl
2003-11-22 22:14     ` Oliver Kiddle

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1838.1069455162@athlon \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-users@sunsite.dk \
    --cc=zsh.Andy@spiegl.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://git.vuxu.org/mirror/zsh/

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).