# Nice prompt eval "$(starship init zsh)" # Quick folder jump eval "$(zoxide init zsh)" # Automatic setup of environments eval "$(direnv hook zsh)" # Plugin manager [ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" # Plugins plug "zap-zsh/supercharge" plug "xPMo/zsh-toggle-command-prefix" plug "zap-zsh/completions" plug "zap-zsh/vim" plug "zsh-users/zsh-autosuggestions" plug "zsh-users/zsh-completions" plug "chivalryq/git-alias" plug "zap-zsh/fzf" plug "zdharma-continuum/fast-syntax-highlighting" plug "zsh-users/zsh-history-substring-search" plug "MichaelAquilina/zsh-you-should-use" # Local plug "$XDG_CONFIG_HOME/zsh/aliases.zsh" plug "$XDG_CONFIG_HOME/zsh/functions.zsh" # VI Mode escape timeout fix export KEYTIMEOUT=1 # Substring search settings export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="bg=blue,fg=black,bold" export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=black,bold' bindkey -M vicmd 'k' history-substring-search-up bindkey -M vicmd 'j' history-substring-search-down # History settings setopt INC_APPEND_HISTORY export HISTTIMEFORMAT="[%F %T]" HISTFILE="$HOME"/.local/state/zsh/history # Add nnn shell level to prompt [ -n "$NNNLVL" ] && PS1="N$NNNLVL $PS1" # cd on nnn quiting nnn_cd () { if ! [ -z "$NNN_PIPE" ]; then printf "%s\0" "0c${PWD}" > "${NNN_PIPE}" !& fi } trap nnn_cd EXIT