-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc.zinit.bak
145 lines (126 loc) · 5.41 KB
/
.zshrc.zinit.bak
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
[[ ! -f ~/.profile ]] || source ~/.profile
autoload -U edit-command-line
zle -N edit-command-line
bindkey -M vicmd v edit-command-line
bindkey "^?" backward-delete-char # Fix the back delete issue: https://github.com/spaceship-prompt/spaceship-prompt/issues/91#issuecomment-327996599
bindkey "^X" clear-screen
export PATH="$PATH:/Users/phisco/.local/bin"
### Added by Zinit's installer
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
print -P "%F{33} %F{34}Installation successful.%f%b" || \
print -P "%F{160} The clone has failed.%f%b"
fi
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
zinit light zsh-users/zsh-syntax-highlighting
zinit light zsh-users/zsh-completions
# zinit light zsh-users/zsh-autosuggestions
#
# zinit ice atinit"
# ZSH_TMUX_FIXTERM=true;
# ZSH_TMUX_AUTOSTART=true;
# ZSH_TMUX_AUTOCONNECT=true;"
# zinit snippet OMZP::tmux
zinit snippet OMZ::lib/compfix.zsh
zinit snippet OMZ::lib/completion.zsh
zinit snippet OMZ::lib/git.zsh
zinit snippet OMZ::plugins/git/git.plugin.zsh
zinit snippet OMZP::common-aliases
zinit snippet OMZP::command-not-found
zinit snippet OMZP::copyfile
zinit snippet OMZP::git
zinit snippet OMZP::golang
zinit snippet OMZP::kubectl
zinit snippet OMZP::sudo
zinit snippet OMZP::vscode
zinit snippet OMZP::brew
zinit lucid for \
atinit"
export ZSH_TMUX_FIXTERM=false
export ZSH_TMUX_AUTOSTART=true
export ZSH_TMUX_AUTOCONNECT=true
export ZSH_TMUX_DEFAULT_SESSION_NAME='</>'
" \
OMZP::tmux \
atinit"HIST_STAMPS=dd.mm.yyyy" \
OMZL::history.zsh
autoload -Uz compinit && compinit
zinit cdreplay -q
if [[ -f "/opt/homebrew/bin/brew" ]] then
eval "$(/opt/homebrew/bin/brew shellenv)"
fi
eval "$(zoxide init zsh)"
eval "$(direnv hook zsh)"
# Completion Options.
setopt complete_in_word # Complete From Both Ends Of A Word.
setopt always_to_end # Move Cursor To The End Of A Completed Word.
setopt path_dirs # Perform Path Search Even On Command Names With Slashes.
setopt auto_menu # Show Completion Menu On A Successive Tab Press.
setopt auto_list # Automatically List Choices On Ambiguous Completion.
setopt auto_param_slash # If Completed Parameter Is A Directory, Add A Trailing Slash.
setopt no_complete_aliases
setopt menu_complete # Do Not Autoselect The First Completion Entry.
unsetopt flow_control # Disable Start/Stop Characters In Shell Editor.
# Zstyle.
zstyle ':completion:*:*:*:*:*' menu select
zstyle ':completion:*:matches' group 'yes'
zstyle ':completion:*' group-name ''
zstyle ':completion::complete:*' use-cache on
zstyle ':completion::complete:*' cache-path "$HOME/.zcompcache"
zstyle ':completion:*' list-colors $LS_COLORS
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*:functions' ignored-patterns '(_*|pre(cmd|exec))'
zstyle ':completion:*' rehash true
zstyle ':completion:*' special-dirs true
# History
HIST_STAMPS="yyyy/mm/dd"
HISTSIZE=5000
HISTFILE=~/.zsh_history
SAVEHIST=$HISTSIZE
HISTDUP=erase
setopt appendhistory
setopt bang_hist # Treat The '!' Character Specially During Expansion.
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 # Delete An Old Recorded Event If A New Event Is A Duplicate.
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_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 prompt_subst
setopt share_history # Share History Between All Sessions.
setopt sharehistory
setopt autocd
# to make cd also see .hidden directories/files
setopt globdots
eval "$(starship init zsh)"
# function powerline_precmd() {
# PS1="$($GOPATH/bin/powerline-go -shorten-eks-names -shorten-gke-names -numeric-exit-codes -cwd-mode fancy -git-mode fancy -error $? -shell zsh -newline -jobs ${${(%):%j}:-0} -modules kube,cwd,git,jobs,exit)"
# }
#
#
# function install_powerline_precmd() {
# for s in "${precmd_functions[@]}"; do
# if [ "$s" = "powerline_precmd" ]; then
# return
# fi
# done
# precmd_functions+=(powerline_precmd)
# }
#
# install_powerline_precmd
[[ ! -f ~/.fzf.zsh ]] || source ~/.fzf.zsh
export FZF_CTRL_T_OPTS="
--walker-skip .git,node_modules,target
--preview 'bat -n --color=always {}'
--bind 'ctrl-/:change-preview-window(down|hidden|)'"
# export ZELLIJ_AUTO_ATTACH=true
# export ZELLIJ_AUTO_EXIT=true
# eval "$(zellij setup --generate-auto-start zsh)"