[xmonad] silly behavior of killWord in XMonad.Prompt

Brent Yorgey byorgey at seas.upenn.edu
Thu Apr 26 15:53:36 CEST 2012

On Wed, Apr 25, 2012 at 09:21:51AM +0200, Aleksandar Dimitrov wrote:
> Vim in insert mode acts like Emacs if you hit ^W, which, I think is more
> relevant here, since you're in "insert mode" when using XPrompt (just like when
> you use ex-mode in Vim after hitting ':') and there's no "command
> mode."

Ah, good to know.

> As others have said, dropping in a parameter for isSpace would be nice, or at
> least making it something like:
> > liftM2 (||) isSpace (=='/')
> One of my reasons for switching to zsh was that when I had punched in a long
> path and made a mistake in the last segment of it, I might hit ^W, but then bash
> deletes the entire path with no possibility of undo! zsh only deletes up to the
> '/', which I prefer greatly.

Hah, I use zsh but have always been annoyed how it deletes a whole
path when I do backwards-kill-word!  So I did a bit of googling and
discovered the WORDCHARS environment variable. =)

In any case, based on the feedback so far I think what I will do is

  (1) change killWord to have emacs-like behavior
  (2) add a variant killWordUsingSep which takes a separator predicate
      as a parameter, to be used instead of isSpace.


More information about the xmonad mailing list