-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.zshrc
62 lines (46 loc) · 1.79 KB
/
.zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
source $HOME/.local/dotfiles/lib/dot.zsh && dot::init
export PROMPT="%(?.%F{green}✓%f.%F{red}×%f) %2~ %F{blue}$%f "
alias vim=nvim
alias vi=vim
alias e="${EDITOR:-"vim"}"
# Use vim keys
bindkey -v
bindkey "^R" history-incremental-search-backward
# edit command line in vim
autoload -z edit-command-line
zle -N edit-command-line
bindkey -M vicmd v edit-command-line
# asdf
. $HOME/.asdf/asdf.sh
fpath=(${ASDF_DIR}/completions $fpath)
# Zoxide (fast cd)
if (( $+commands[zoxide] )) ; then
eval "$(zoxide init zsh)"
fi
HISTFILE=$HOME/.zsh_history
HISTSIZE=100000
SAVEHIST=$HISTSIZE
setopt hist_ignore_all_dups # remove older duplicate entries from history
setopt hist_reduce_blanks # remove superfluous blanks from history items
setopt inc_append_history # save history entries as soon as they are entered
setopt share_history # share history between different instances of the shell
setopt auto_cd # cd by typing directory name if it's not a command
setopt auto_list # automatically list choices on ambiguous completion
setopt auto_menu # automatically use menu completion
setopt always_to_end # move cursor to end if word had one match
zstyle ':completion:*' menu select # select completions with arrow keys
zstyle ':completion:*' group-name '' # group results by category
zstyle ':completion:::::' completer _expand _complete _ignored _approximate # enable approximate matches for completion
[ -f "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh ] && source "${XDG_CONFIG_HOME:-$HOME/.config}"/fzf/fzf.zsh
[ -f ~/.zshrc.local ] && source ~/.zshrc.local
zmodload -i zsh/complist
# Completions
if type brew &>/dev/null; then
fpath=($(brew --prefix)/share/zsh/site-functions $fpath)
fi
autoload -Uz compinit
if [ $(date +'%j') != $(stat -f '%Sm' -t '%j' ~/.zcompdump) ]; then
compinit
else
compinit -C
fi