Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: how to prevent $'command'<return> from changing the vi mode?
- X-seq: zsh-users 17755
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: how to prevent $'command'<return> from changing the vi mode?
- Date: Wed, 10 Apr 2013 11:11:42 -0700
- In-reply-to: <CAMXWGTyQHMryXPooFbp6mzYd-8VeWMkf4EqYb0eF+W6G=WuOOA@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAMXWGTyQHMryXPooFbp6mzYd-8VeWMkf4EqYb0eF+W6G=WuOOA@mail.gmail.com>
On Apr 9, 9:52pm, Leonardo Barbosa wrote:
}
} I'm using vi mode in zsh. When i'm in normal mode and enter a command,
} for instance, $ls<return>, it enters in insert mode. I would like,
} however, to stay as in the same mode as I was prior to hit <return>.
} How can i do that?
You need to look at the zle-line-init and zle-line-finish widgets. You
can find several examples by going here:
http://www.zsh.org/cgi-bin/mla/wilma/users
and searching for "zle-line-finish".
The idea is to save the mode in zle-line-finish and then restore the
saved mode (if there is one) in zle-line-init. Just be sure you have
covered the case of not having saved a mode yet so that the first
prompt of a new shell is in the state you want.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author