2020-11-26 22:46:40 +01:00
|
|
|
bindkey -v
|
|
|
|
bindkey '^?' backward-delete-char
|
|
|
|
bindkey "^A" vi-beginning-of-line
|
|
|
|
bindkey "^E" vi-end-of-line
|
2020-11-26 22:54:10 +01:00
|
|
|
bindkey "^P" up-line-or-history
|
|
|
|
bindkey "^N" down-line-or-history
|
2020-11-26 22:57:11 +01:00
|
|
|
bindkey "^K" forward-char
|
2020-11-27 01:01:44 +01:00
|
|
|
bindkey "^U" kill-whole-line
|
2020-11-27 01:40:28 +01:00
|
|
|
bindkey -r "^[OA" up-line-or-history
|
|
|
|
bindkey -r "^[[A" up-line-or-history
|
2020-11-26 22:46:40 +01:00
|
|
|
|
2020-10-05 12:14:33 +02:00
|
|
|
autoload -U promptinit && promptinit
|
2020-10-22 16:25:26 +02:00
|
|
|
autoload -U compinit && compinit -d $XDG_DATA_HOME/zsh/zcompdump
|
2020-10-01 17:06:17 +02:00
|
|
|
|
2020-10-05 12:14:33 +02:00
|
|
|
export HISTSIZE=10000
|
|
|
|
SAVEHIST=$HISTSIZE
|
2020-10-22 16:25:26 +02:00
|
|
|
HISTFILE=$XDG_DATA_HOME/zsh/history
|
2020-10-05 12:14:33 +02:00
|
|
|
setopt inc_append_history
|
|
|
|
setopt share_history
|
2020-01-10 23:06:53 +01:00
|
|
|
|
2020-10-26 16:46:04 +01:00
|
|
|
zstyle ':completion:*' menu select
|
|
|
|
zstyle ':completion:*' list-colors ''
|
|
|
|
zmodload zsh/complist
|
|
|
|
|
2020-11-16 12:21:16 +01:00
|
|
|
export LESSHISTFILE='/dev/null'
|
|
|
|
|
2020-10-25 13:35:24 +01:00
|
|
|
source $XDG_CONFIG_HOME/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
|
|
source $XDG_CONFIG_HOME/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
|
|
|
2020-10-25 20:56:41 +01:00
|
|
|
if [ -f $XDG_CONFIG_HOME/fzf/fzf.zsh ]; then
|
|
|
|
source $XDG_CONFIG_HOME/fzf/fzf.zsh
|
|
|
|
export FZF_DEFAULT_COMMAND='fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd'
|
|
|
|
export FZF_CTRL_T_COMMAND='fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd'
|
2020-11-25 13:15:21 +01:00
|
|
|
export FZF_DEFAULT_OPTS="--multi -e --ansi --layout=reverse --preview='bat --color=always --tabs=2 --style=plain --theme=gruvbox {}'"
|
2020-10-25 21:37:12 +01:00
|
|
|
export FZF_CTRL_R_OPTS="-e --ansi --layout=reverse --preview=''"
|
2020-10-25 20:56:41 +01:00
|
|
|
_fzf_compgen_path() {
|
|
|
|
fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd . "$1"
|
|
|
|
}
|
|
|
|
_fzf_compgen_dir() {
|
|
|
|
fd -H -L --ignore-file $XDG_CONFIG_HOME/local/fd --type d . "$1"
|
|
|
|
}
|
2020-10-25 21:37:12 +01:00
|
|
|
gs() {
|
|
|
|
git -c color.status=always status --short |
|
|
|
|
fzf --ansi --preview '(git diff --color=always -- {-1} | sed 1,4d; cat {-1})'
|
|
|
|
}
|
2020-10-25 20:56:41 +01:00
|
|
|
fi
|
2020-02-01 17:58:00 +01:00
|
|
|
|
2020-10-22 16:25:26 +02:00
|
|
|
source $XDG_CONFIG_HOME/zsh/themes/powerlevel10k/powerlevel10k.zsh-theme
|
2020-09-22 23:03:51 +02:00
|
|
|
source ~/.dotfiles/zsh/p10k.zsh
|
|
|
|
|
2020-10-22 16:25:26 +02:00
|
|
|
[ -e $XDG_CONFIG_HOME/local/zsh ] && source $XDG_CONFIG_HOME/local/zsh
|