by puffoflogic · 4y ago · 0 comments
In zsh (vi mode) I simply press shift-v and I am dropped into my $EDITOR with my current input loaded into a buffer. Of course I rarely need to do this because zsh vi mode covers 99% of my requirements.
So, my tldr for an article I didn't finish reading: someone doesn't know how to use their tools and instead of learning they jumped on the internet to complain, and/or sell me a solution or something, idk.
esc -> v does work both with bash and mksh on ubuntu with stock config but not out of the box with zsh on my macbook so i suspect there is something missing im my one line .zshrc file.
Capital V is an actual vim command btw triggering linewise visual mode and that does somewhat seem to actually seem to be the functionality of shift-v by default in zsh.
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.
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.
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-lineMaybe you don't find it valuable because your setup and mad vi skills offer you an alternative (which I'm very sure is just as feature-rich as what is described in the post, which you didn't read). Isn't it obvious how a more accessible solution might be useful to some people?
I for one welcome the efforts of the Warp team to improve terminal UX.