diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index 11c1ccc..e7086b8 100755 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -9,6 +9,8 @@ typeset -A ZSH_SYNTAX_HIGHLIGHTING_STYLES ZSH_SYNTAX_HIGHLIGHTING_STYLES=( default 'none' + isearch 'fg=magenta,standout' + special 'fg=magenta,standout' unknown-token 'fg=red,bold' reserved-word 'fg=yellow,bold' alias 'fg=green,bold' @@ -44,25 +46,64 @@ ZSH_HIGHLIGHT_TOKENS_FOLLOWED_BY_COMMANDS=( # ZLE events that trigger an update of the highlighting. ZSH_HIGHLIGHT_ZLE_UPDATE_EVENTS=( - self-insert - magic-space - delete-char - delete-char-or-list - backward-delete-char - kill-word - backward-kill-word - up-line-or-history - down-line-or-history - beginning-of-history - end-of-history + accept-and-hold + accept-and-infer-next-history accept-line accept-line-and-down-history - undo - redo - yank + backward-delete-char + backward-delete-word + backward-kill-word + beginning-of-buffer-or-history + beginning-of-history + beginning-of-history + beginning-of-line-hist complete-word + delete-char + delete-char-or-list + down-history + down-line-or-history + down-line-or-history + down-line-or-search + end-of-buffer-or-history + end-of-history + end-of-line-hist expand-or-complete expand-or-complete-prefix + history-beginning-search-backward + history-beginning-search-forward + history-incremental-search-backward + history-incremental-search-forward + history-search-backward + history-search-forward + infer-next-history + insert-last-word + kill-word + magic-space + quoted-insert + redo + self-insert + undo + up-history + up-line-or-history + up-line-or-history + up-line-or-search + up-line-or-search + vi-backward-kill-word + vi-down-line-or-history + vi-fetch-history + vi-history-search-backward + vi-history-search-forward + vi-quoted-insert + vi-repeat-search + vi-rev-repeat-search + vi-up-line-or-history + yank +) + +# ZLE highlight types. +zle_highlight=( + special:$ZSH_SYNTAX_HIGHLIGHTING_STYLES[special] + isearch:$ZSH_SYNTAX_HIGHLIGHTING_STYLES[isearch] ) # Check if the argument is a path.