Fix zsh plugins

This commit is contained in:
Jordan Holt 2021-01-17 20:15:52 +00:00
parent 167aa036e6
commit 8fb9150d01
2 changed files with 36 additions and 5 deletions

View File

@ -3,11 +3,13 @@ setopt autocd
setopt nobgnice # Run bg jobs at normal priority setopt nobgnice # Run bg jobs at normal priority
setopt nonotify # Don't notify when bg jobs complete setopt nonotify # Don't notify when bg jobs complete
setopt nobeep setopt nobeep
setopt interactive_comments
stty stop undef
# History config # History config
HISTFILE="${XDG_CACHE_HOME:-${HOME}/.cache}/zsh/history" HISTFILE="${XDG_CACHE_HOME:-${HOME}/.cache}/zsh/history"
HISTSIZE=10000 HISTSIZE=10000000
SAVEHIST=10000 SAVEHIST=10000000
[[ !( -f "${HISTFILE}" ) ]] && mkdir -p $(dirname ${HISTFILE}) [[ !( -f "${HISTFILE}" ) ]] && mkdir -p $(dirname ${HISTFILE})
setopt HIST_IGNORE_DUPS setopt HIST_IGNORE_DUPS
@ -24,14 +26,33 @@ autoload -U colors && colors
# Prompt # Prompt
PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b " PS1="%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "
bindkey -v
export KEYTIMEOUT=1
# Aliases # Aliases
source "${XDG_CONFIG_HOME:-${HOME}/.config}/.aliasrc" source "${XDG_CONFIG_HOME:-${HOME}/.config}/.aliasrc"
# Autosuggest # Autosuggest
source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh 2>/dev/null
# History substring search
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh 2>/dev/null
bindkey -M vicmd 'k' history-substring-search-up
bindkey -M vicmd 'j' history-substring-search-down
# Highlighting # Highlighting
source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null source /usr/share/zsh/plugins/fast-syntax-highlighting/fast-syntax-highlighting.plugin.zsh 2>/dev/null
# History substring search # Enhanced vim mode
source /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.plugin.zsh 2>/dev/null MODE_INDICATOR=""
MODE_CURSOR_VIINS="#b77ee0 blinking bar"
MODE_CURSOR_REPLACE="$MODE_CURSOR_VIINS #ff3334"
MODE_CURSOR_VICMD="#b77ee0 block"
MODE_CURSOR_SEARCH="#e7c547 steady underline"
MODE_CURSOR_VISUAL="$MODE_CURSOR_VICMD steady bar"
MODE_CURSOR_VLINE="$MODE_CURSOR_VISUAL #54ced6"
source /usr/share/zsh/plugins/zsh-vim-mode/zsh-vim-mode.plugin.zsh 2>/dev/null
# Generic keybindings
bindkey -s '^f' 'cd "$(dirname "$(fzf)")"\n'

View File

@ -23,4 +23,14 @@ sudo pacman -Sy \
ttf-ubuntu-font-family \ ttf-ubuntu-font-family \
youtube-dl \ youtube-dl \
zathura \ zathura \
zsh zsh \
zsh-autosuggestions \
zsh-history-substring-search
[ -d "/usr/share/zsh/plugins/fast-syntax-highlighting" ] || sudo git clone \
https://github.com/zdharma/fast-syntax-highlighting \
/usr/share/zsh/plugins/fast-syntax-highlighting
[ -d "/usr/share/zsh/plugins/zsh-vim-mode" ] || sudo git clone \
https://github.com/softmoth/zsh-vim-mode \
/usr/share/zsh/plugins/zsh-vim-mode