-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
51 lines (39 loc) · 1.57 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
# Shell configuration
setopt HIST_IGNORE_ALL_DUPS
setopt SH_WORD_SPLIT
## Git completion support
# See https://github.com/git/git/blob/master/contrib/completion/git-completion.zsh
zstyle ':completion:*:*:git:*' script ~/git-completion.zsh
fpath=(~/.zsh $fpath)
autoload -Uz compinit && compinit
## Enable vi mode for better command-line navigation
bindkey -v
# allow vv to edit the command line (standard behaviour)
# Copied from https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/vi-mode
autoload -Uz edit-command-line
zle -N edit-command-line
bindkey -M vicmd 'vv' edit-command-line
## Enable ASDF
. $HOME/.asdf/asdf.sh
# Local config
[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local
# Include aliases
[[ -f ~/.aliases ]] && source ~/.aliases
# Set PATH, MANPATH, etc., for Homebrew.
eval "$(/opt/homebrew/bin/brew shellenv)"
# Set env for nodenv
eval "$(nodenv init -)"
# case insensitive path-completion
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*'
# partial completion suggestions
zstyle ':completion:*' list-suffixes
zstyle ':completion:*' expand prefix suffix
# git prompt
autoload -Uz vcs_info
precmd_vcs_info() { vcs_info }
precmd_functions+=( precmd_vcs_info )
setopt prompt_subst
RPROMPT=\$vcs_info_msg_0_
zstyle ':vcs_info:git:*' formats '%F{240}(%b) %r%f'
zstyle ':vcs_info:*' enable git
# Set up fzf key bindings and fuzzy completion
source <(fzf --zsh)