Add forward-word & backward-word.

This commit is contained in:
Gea-Suan Lin
2022-04-16 22:31:59 +08:00
parent d4190b6f5a
commit ea959cb285

3
.zshrc
View File

@@ -93,6 +93,9 @@ fi
[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history [[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" end-of-buffer-or-history
[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history [[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" beginning-of-buffer-or-history
# #
bindkey "\e[1;3C" forward-word
bindkey "\e[1;3D" backward-word
#
autoload -Uz history-search-end autoload -Uz history-search-end
zle -N history-beginning-search-backward-end history-search-end zle -N history-beginning-search-backward-end history-search-end
zle -N history-beginning-search-forward-end history-search-end zle -N history-beginning-search-forward-end history-search-end