old-yadm
earnest ma 2021-07-04 22:52:54 -04:00
parent 0f44d5ec20
commit 69395b7a0c
No known key found for this signature in database
GPG Key ID: 6B361FA81C5FB695
1 changed files with 18 additions and 12 deletions

View File

@ -3,13 +3,14 @@
autoload -U colors && colors autoload -U colors && colors
# Options
setopt auto_cd setopt auto_cd
# History # History
setopt EXTENDED_HISTORY setopt EXTENDED_HISTORY
setopt SHARE_HISTORY setopt SHARE_HISTORY
setopt APPEND_HISTORY setopt APPEND_HISTORY
setopt INC_APPEND_HISTORY # setopt INC_APPEND_HISTORY # unexpected last result with multiple open terminals
setopt HIST_REDUCE_BLANKS setopt HIST_REDUCE_BLANKS
HISTSIZE=10000 HISTSIZE=10000
SAVEHIST=10000 SAVEHIST=10000
@ -27,28 +28,32 @@ zmodload zsh/complist
compinit compinit
_comp_options+=(globdots) # include hidden files _comp_options+=(globdots) # include hidden files
# keybindings: force emacs state # Keybindings
bindkey -e bindkey -e # force Emacs state, even with $EDITOR=nvim
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
bindkey -s '^L' '^Uclear^M' # clear using alias
# edit line in editor w/ ctrl-k (from Luke Smith's .zshrc) # edit line in editor w/ ctrl-k (from Luke Smith's .zshrc)
autoload edit-command-line; zle -N edit-command-line autoload edit-command-line; zle -N edit-command-line
bindkey '^k' edit-command-line bindkey '^k' edit-command-line
bindkey "^[[1;5C" forward-word # Aliases
bindkey "^[[1;5D" backward-word
bindkey -s '^L' '^Uclear^M'
[ -f "$E_SCRIPTS_DIR/aliases.sh" ] && source "$E_SCRIPTS_DIR/aliases.sh" [ -f "$E_SCRIPTS_DIR/aliases.sh" ] && source "$E_SCRIPTS_DIR/aliases.sh"
# Run `git -C .config/zsh/autocomplete pull' to update # zsh-specific aliases
source $ZDOTDIR/autocomplete/zsh-autocomplete.plugin.zsh # clear zsh history: Adapted from Novimatrem: https://gitlab.com/Novimatrem/clear-bash-history
zstyle ':autocomplete:*' min-input 1 alias czh="echo 'Fully clearing history, then exiting...' && cat /dev/null > $XDG_CACHE_HOME/zshhistory && history -p && exit"
zstyle ':autocomplete:*' min-delay 0.25
# Prompt # Prompt
PROMPT="%K{238}%F{104}%n%f%k%K{238}%F{104}@%f%k%K{238}%F{104}%m%f%k%K{238}%F{104}:%2~> %f%k" PROMPT="%K{238}%F{104}%n%f%k%K{238}%F{104}@%f%k%K{238}%F{104}%m%f%k%K{238}%F{104}:%2~> %f%k"
# Plugins! I try to keep as few as possible
# Cloned from bootstrap file, run `git -C .config/zsh/autocomplete pull' to update
source $ZDOTDIR/autocomplete/zsh-autocomplete.plugin.zsh
zstyle ':autocomplete:*' min-input 1
zstyle ':autocomplete:*' min-delay 0.25
autoload -Uz vcs_info autoload -Uz vcs_info
precmd_vcs_info() { vcs_info } precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info ) precmd_functions+=( precmd_vcs_info )
@ -59,3 +64,4 @@ zstyle ':vcs_info:*' enable git
# This must be placed at the end # This must be placed at the end
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh