I want to have the same function of Bash+emacs_mode on Zsh+vi_mode, when you type ESC+. you get the last argument of the last command under the cursor. How can I get it on ZSH?
You can use the same widget (insert-last-word
) in both viins
and emacs
mode; it just isn't bound to a key by default in viins
mode.
Run the following in the current shell (and add it to .zshrc
for it to take effect in future shells).
bindkey -M viins '\e.' insert-last-word
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With