1
0
mirror of https://github.com/akelge/zsh synced 2025-10-13 22:05:00 +00:00

Compare commits

...

2 Commits

Author SHA1 Message Date
faa052c91b Use -end variant 2025-09-18 16:49:14 +02:00
3b9ddbc77a Change history search 2025-09-18 16:47:24 +02:00

View File

@ -8,12 +8,16 @@ bindkey "-e"
autoload -U select-word-style autoload -U select-word-style
select-word-style bash select-word-style bash
# History search # # History search
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
# bindkey "\e[A" history-search-backward
# bindkey "\e[B" history-search-forward
# Command line editing in $EDITOR # Command line editing in $EDITOR
autoload -z edit-command-line autoload -z edit-command-line
zle -N edit-command-line zle -N edit-command-line
@ -30,8 +34,9 @@ bindkey "\e[1~" beginning-of-line
bindkey "\e[F" end-of-line bindkey "\e[F" end-of-line
bindkey "\e[4~" end-of-line bindkey "\e[4~" end-of-line
bindkey "\e[A" history-search-backward # History search
bindkey "\e[B" history-search-forward bindkey "^[[A" history-beginning-search-backward-end
bindkey "^[[B" history-beginning-search-forward-end
# Required by Terminus in Sublime Text # Required by Terminus in Sublime Text
bindkey "\e[1;3C" forward-word bindkey "\e[1;3C" forward-word
@ -39,14 +44,14 @@ bindkey "\e[1;3D" backward-word
# VI mode history search # VI mode history search
bindkey -M vicmd '^[[A' history-beginning-search-backward-end \ bindkey -M vicmd '^[[A' history-beginning-search-backward \
'^[OA' history-beginning-search-backward-end \ '^[OA' history-beginning-search-backward \
'^[[B' history-beginning-search-forward-end \ '^[[B' history-beginning-search-forward \
'^[OB' history-beginning-search-forward-end '^[OB' history-beginning-search-forward
bindkey -M viins '^[[A' history-beginning-search-backward-end \ bindkey -M viins '^[[A' history-beginning-search-backward \
'^[OA' history-beginning-search-backward-end \ '^[OA' history-beginning-search-backward \
'^[[B' history-beginning-search-forward-end \ '^[[B' history-beginning-search-forward \
'^[OB' history-beginning-search-forward-end '^[OB' history-beginning-search-forward
bindkey -M viins "\e[H" beginning-of-line \ bindkey -M viins "\e[H" beginning-of-line \
"\e[1~" beginning-of-line \ "\e[1~" beginning-of-line \