Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Strange behaviour in zsh's emacs bindings



On Fri, 16 Jan 2009, AndrÃs Goens wrote:

Hello,

I have been using the zsh with emacs bindings for some time now and
have noticed that the killing/moving forward of a single word (M-d,
M-^H, M-f,M-b) does not work the way it works under emacs (or bash
with emacs bindings, for example) as it treats strings like
"/this/is/a/long/path" as a single word, as it does with strings
separated with points, e.g.
"these.are.some.words.sepparated.by.points" and kills/goes over it in
one single step. It can get very annoying when working with longer
paths and such, [...]

Hi AndrÃs,

You should remove '.' and '/' from the WORDCHARS variable. Putting a character in WORDCHARS tells Zsh to treat it as if it is part of a normal "word". (i.e. that it *isn't* something that marks a word boundary.)

I haven't used emacs in a long time, so I'm not sure what else might be inconsistent between the two. And maybe someone else can chime in with the default value of WORDCHARS?

Best,
Ben


Messages sorted by: Reverse Date, Date, Thread, Author