# Aliase
source $XDG_CONFIG_HOME/zsh/aliases

# Optionen
setopt   AUTO_PARAM_SLASH
unsetopt CASE_GLOB
setopt   HIST_SAVE_NO_DUPS

[[ ! -r /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] || source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
[[ ! -r /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]] || source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
[[ ! -r ~/.opam/opam-init/init.zsh ]] || source ~/.opam/opam-init/init.zsh

bindkey -v
export KEYTIMEOUT=1

fpath=($XDG_CONFIG_HOME/zsh $fpath)
autoload -Uz prompt; prompt
autoload -Uz completion; completion

# Keybindings
zmodload zsh/complist
bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'j' vi-down-line-or-history

autoload -Uz surround
zle -N delete-surround surround
zle -N add-surround surround
zle -N change-surround surround
bindkey -M vicmd cs change-surround
bindkey -M vicmd ds delete-surround
bindkey -M vicmd ys add-surround
bindkey -M visual S add-surround

bindkey '^A' vi-beginning-of-line
bindkey '^E' vi-end-of-line

