3 ms·
> what did you actually do Enable vi mode (usually in .zshrc but you can test from the command line): set -o vi Invoke $EDITOR on the current command line:
by quesera 4y ago
> what did you actually do
Enable vi mode (usually in .zshrc but you can test from the command line):
set -o vi
Invoke $EDITOR on the current command line:
ls -la /tmp<Esc><v>
That's Escape, then the lowercase v key (sequentially, not together)
You can use up-arrow to go through command history, reach the one you want to rerun with modifications, then press Esc, v.
- Stranger43 4y agoYes thats how it works for me with bash and ksh(mksh) but with zsh esc -v does not launch $EDITOR but just puts me in visual mode inside of whatever it uses for readline. I even tried setting editor to something other then vi(scite) and it's clear that where bash and korn lauched $EDITOR on <Esc><v> zsh does not. My .zsh file on macOS is literally just "set -o vi" I guess there is some kind of added magic here(are you using the oh-my-ssh macro's) that's just not applied with my deliberately minimalist .zshrc.
- quesera 4y agoAh, maybe. My .zshrc is pretty minimal and hasn't changed in a very long time, but I did find this: set -o vi # command editing in vi mode (ESC-v) autoload -U edit-command-line zle -N edit-command-line bindkey -M vicmd v edit-command-line