4 ms·
TL;dr. 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
by puffoflogic 4y ago
TL;dr.
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.
- nsdarren 4y agoWhat's the point of this comment other than being snarky/attempting to show off? You should reflect on it, because this would be a better place if people like you just didn't bother replying. Maybe 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.
- Stranger43 4y agoInterestingly for me this dont work with .zsh out of the box on my mac(i run a deliberately minimalist .zsh) what did you actually do to enable it. 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.
- 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