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

Default setting of ZLE keymap



For just about as long as zsh has existed, interactive shells at
startup have examined the environment variables $VISUAL and $EDITOR
for clues as to whether the default key bindings should be emacs-like
or vi-like.

Recently it was noticed that when one of these variables uses a full
path to name the editor program, the substring "vi" appearing anywhere
in that path (such as, in the name of the user's home directory) would
cause the vi-mode keymaps to be incorrectly enabled.

Two possible approaches have been suggested to address this:
(1) The whole scheme of using VISUAL / EDITOR to select zsh bindings
should be abandoned.  It's obsolete and no one uses those variables
for that purpose any longer.  Zsh should default to emacs behavior
unless an rc-file explicitly performs "bindkey -v".
(2) Continue to look at the two variables, but assure that "vi" has to
appear in the command name, that is, after the rightmost slash in any
path, or in the first word if there are no slashes.

Throwing the question out to a wider audience: If the zsh-users list
expresses no particular preference, or no need for #2, zsh-workers
will proceed with #1.

Discuss.  Thanks.




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