zsh: Add bash-like alt-dot hotkey
Allows pressing <alt-.> when in insertion mode in zsh to add the first (then second, third, ...) argument from the last line to the end of the current line. Especially useful for things like: ``` mkdir -p my/folder/deeply nested cd <alt-.> ``` to instantly move to the folder!
This commit is contained in:
parent
ebb937a0e3
commit
454073b408
1 changed files with 4 additions and 0 deletions
|
@ -143,6 +143,10 @@ bindkey " " globalias
|
|||
bindkey "^ " magic-space # control-space to bypass completion
|
||||
bindkey -M isearch " " magic-space # normal space during searches
|
||||
|
||||
# allow inserting previous arguments in the current zle input
|
||||
# see https://stackoverflow.com/a/34861762
|
||||
bindkey "^[." insert-last-word
|
||||
|
||||
# VIM MODE for the shell
|
||||
# enable vim mode on pressing escape
|
||||
bindkey -v
|
||||
|
|
Loading…
Reference in a new issue