-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
81 lines (64 loc) · 3.35 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:$PATH
# export MANPATH="/usr/local/man:$MANPATH"
# You may need to manually set your language environment
# export LANG=en_US.UTF-8
export EDITOR='nvim'
export VISUAL=$EDITOR
export LESS=-iXFR
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
bindkey -v
[[ ! -f ~/.zsh_aliases ]] || source ~/.zsh_aliases
autoload -U compinit && compinit -i
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' use-cache on
zstyle ':completion:*' cache-path ~/.cache/zsh
if [[ -d $HOME/.pyenv ]]
then
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
fi
fpath+=${ZDOTDIR:-~}/.zsh_functions
setopt correct # Auto correct mistakes
setopt extendedglob # Extended globbing. Allows regular expressions with *
setopt nocaseglob # Case-insensitive globbing
setopt rcexpandparam # Array expansion with parameters
setopt numericglobsort # Sort filenames numerically when it makes sense
setopt auto_cd # Use cd by typing directory name if it's not a command.
setopt auto_list # Automatically list choices on ambiguous completion.
setopt auto_pushd # Make cd push the old directory onto the directory stack.
setopt bang_hist # Treat the '!' character, especially during Expansion.
setopt interactive_comments # Comments even in interactive shells.
setopt no_beep # Don't beep on error.
setopt prompt_subst # Substitution of parameters inside the prompt each time the prompt is drawn.
setopt pushd_ignore_dups # Don't push multiple copies directory onto the directory stack.
#setopt pushd_minus # Swap the meaning of cd +1 and cd -1 to the opposite.
# History
HISTSIZE=5000
HISTFILE=~/.zsh_history
SAVEHIST=5000
setopt append_history # Allow multiple sessions to append to one Zsh command history.
setopt extended_history # Show timestamp in history.
setopt hist_expire_dups_first # Expire A duplicate event first when trimming history.
setopt hist_find_no_dups # Do not display a previously found event.
setopt hist_ignore_all_dups # Remove older duplicate entries from history.
setopt hist_ignore_dups # Do not record an event that was just recorded again.
setopt hist_ignore_space # Do not record an Event Starting With A Space.
setopt hist_reduce_blanks # Remove superfluous blanks from history items.
setopt hist_save_no_dups # Do not write a duplicate event to the history file.
setopt hist_verify # Do not execute immediately upon history expansion.
setopt inc_append_history # Write to the history file immediately, not when the shell exits.
setopt share_history # Share history between different instances of the shell.
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
if [[ `uname` == "Darwin" ]]; then
export USR_DIR=/opt/homebrew
else
export USR_DIR=/usr
fi
export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=${USR_DIR}/share/zsh-syntax-highlighting/highlighters
source ${USR_DIR}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
eval "$(starship init zsh)"