You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
722 B

#
# Integrates zsh-autosuggestions into Prezto.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Load dependencies.
pmodload 'editor'
# Source module files.
source "${0:h}/external/zsh-autosuggestions.zsh" || return 1
#
# Highlighting
#
# Set highlight color, default 'fg=8'.
zstyle -s ':prezto:module:autosuggestions:color' found \
'ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE' || ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8'
# Disable highlighting.
if ! zstyle -t ':prezto:module:autosuggestions' color; then
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=''
fi
#
# Key Bindings
#
if [[ -n "$key_info" ]]; then
# vi
bindkey -M viins "$key_info[Control]F" vi-forward-word
bindkey -M viins "$key_info[Control]E" vi-add-eol
fi