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

Re: I have a question about zsh's bindkey.



On Sep 17,  1:45pm, Timothy J. Luoma wrote:
} Subject: Re: I have a question about zsh's bindkey.
}
} Add this to one of your zsh dotfiles (.zshrc or .zshenv I guess):
} 
} # Leave =/&; out of WORDCHARS so ^W acts more nicely 
} # -- still not ideal
} WORDCHARS='*?_-.[]~\!#$%^(){}<>|`@#$%^*()+:?'
} 
} I'm not sure how this works, because the "/" isn't even listed in the 
} WORDCHAR, but it does work.

WORDCHARS is funny.

It means "the characters IN ADDITION to [A-Z][a-z][0-9] that should be
treated as PART OF a word".  So to get word-motions to stop at a new
character, you REMOVE that character from WORDCHARS.

} It doesn't seem to stop at the characters as I think it should (it 
} doesn't stop at a "." in the middle of a word) but it will stop at the 
} "/" as you described

To stop at ".", change the definition to leave "." out:

WORDCHARS='*?_-.[]~\!#$%^(){}<>|`@#$%^*()+:?'

(I'm not sure why some characters are in there twice ... seems to me it
should work to just use

WORDCHARS='*?_-.[]~\!#$%^(){}<>|`@+:'

with or without ".".  Yes, I realize I probably sent the original value
to this list with repeated characters a while back.)

-- 
Bart Schaefer                                      Vice President, Technology
schaefer@xxxxxxxxxx                                Z-Code / NCD Software Inc.

What quantity of engineers is required to rotationally reconfigure an
electronically-actuated filament-enabled photon-wave generator?



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