mirror of
https://github.com/bertptrs/vimconfig.git
synced 2025-12-25 12:30:32 +01:00
Better history search and syntax highlighting.
This commit is contained in:
9
zshrc
9
zshrc
@@ -48,10 +48,15 @@ zle -N history-beginning-search-backward-end history-search-end
|
||||
zle -N history-beginning-search-forward-end history-search-end
|
||||
zle -N history-incremental-search-backward-end history-search-end
|
||||
|
||||
bindkey "\e[A" history-beginning-search-backward-end
|
||||
bindkey "\e[B" history-beginning-search-forward-end
|
||||
[[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" history-beginning-search-backward
|
||||
[[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" history-beginning-search-forward
|
||||
bindkey '^R' history-incremental-search-backward-end
|
||||
|
||||
# Syntax highlighting, if available.
|
||||
if [[ -f /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]]; then
|
||||
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
fi
|
||||
|
||||
# Home and end keys working
|
||||
bindkey "${terminfo[khome]}" beginning-of-line
|
||||
bindkey "${terminfo[kend]}" end-of-line
|
||||
|
||||
Reference in New Issue
Block a user