1
0
mirror of https://github.com/bertptrs/vimconfig.git synced 2025-12-25 20:40:32 +01:00

Better history search and syntax highlighting.

This commit is contained in:
Bert Peters
2016-03-21 18:50:18 +01:00
parent 6d0c6a40a6
commit 84da449e94

9
zshrc
View File

@@ -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-beginning-search-forward-end history-search-end
zle -N history-incremental-search-backward-end history-search-end zle -N history-incremental-search-backward-end history-search-end
bindkey "\e[A" history-beginning-search-backward-end [[ -n "${key[PageUp]}" ]] && bindkey "${key[PageUp]}" history-beginning-search-backward
bindkey "\e[B" history-beginning-search-forward-end [[ -n "${key[PageDown]}" ]] && bindkey "${key[PageDown]}" history-beginning-search-forward
bindkey '^R' history-incremental-search-backward-end 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 # Home and end keys working
bindkey "${terminfo[khome]}" beginning-of-line bindkey "${terminfo[khome]}" beginning-of-line
bindkey "${terminfo[kend]}" end-of-line bindkey "${terminfo[kend]}" end-of-line