]> git.netwichtig.de Git - user/henk/vcsh/zsh.git/blob - .zshrc
fix: explanation what that setting is for
[user/henk/vcsh/zsh.git] / .zshrc
1 # zprof only makes sense at the very top
2 # zmodload zsh/zprof
3
4
5 # settings for the zsh don’t get exported
6
7 # where to write history
8 HISTFILE=~/.zsh_history
9 HISTSIZE=1000000000
10 SAVEHIST=1000000000
11
12 # print time needed for execution when it takes longer than this value
13 REPORTTIME=10
14
15
16 ## define word characters (for stuff like backward-word, forward-word, backward-kill-word,..)
17 ## these are NOT separators but chars considered part of a word
18 #WORDCHARS='*?_-.[]~=/&;!#$%^(){}<>' # the default
19
20 # zsh you-should-use
21 export YSU_MODE=ALL
22
23
24 # where zsh looks for functions
25 fpath=(~/.zsh_functions $fpath)
26
27
28 # hashed directories are usually independent and standalone
29 # so they can stay at the top
30 hash -d diary=~/Data/henksfiles/workinprogress/Dokumente/diary
31 hash -d lifedocs=~/Data/henksfiles/workinprogress/Dokumente/Leben
32 hash -d bewerbung=~/Data/personal/henk/workinprogress/Dokumente/Arbeit/bewerbung
33 hash -d rezepte=~/Data/henksfiles/workinprogress/Dokumente/rezepte/cuisine
34 hash -d templates=~/Data/henksfiles/workinprogress/templates
35 hash -d gitignore=~/Data/public/software/gitignore
36 hash -d doc=/usr/share/doc
37 hash -d TODO=~/Data/henksfiles/TODO/
38 hash -d fortunes=~/Data/henksfiles/workinprogress/Dokumente/fortunes/
39
40
41 # aliases are usually independent and standalone
42 source ~/.zsh_aliases
43 # TODO break this up or make functions or get rid?
44 source ~/.zsh_qemu
45
46
47 # load plugin manager after all 'static' stuff is done
48 # source ~/Data/public/software/zinit/zinit.zsh
49 source "${HOME}/.zgenom/zgenom.zsh"
50 # Check for plugin and zgenom updates every 7 days
51 # This does not increase the startup time.
52 zgenom autoupdate
53
54
55 # mostly static stuff, env vars
56 # zinit load 'https://github.com/joel-porquet/zsh-dircolors-solarized'
57 # zinit load "https://github.com/greymd/tmux-xpanes"
58 zgenom load 'https://github.com/joel-porquet/zsh-dircolors-solarized'
59 zgenom load "https://github.com/greymd/tmux-xpanes"
60
61
62 # options are usually independent and standalone
63 # so they can stay at the top
64 setopt AUTO_CD
65 setopt CHASE_LINKS
66
67 setopt AUTO_NAME_DIRS
68
69 setopt BRACE_CCL
70 setopt EXTENDED_GLOB
71 setopt MARK_DIRS
72 setopt NUMERIC_GLOB_SORT
73 setopt RC_EXPAND_PARAM
74 #setopt WARN_CREATE_GLOBAL
75 setopt GLOB_DOTS
76
77 # remove previous entries from history
78 setopt HIST_IGNORE_ALL_DUPS
79 # do not write lines starting with a space to history file
80 setopt HIST_IGNORE_SPACE
81 # Remove superfluous blanks
82 setopt HIST_REDUCE_BLANKS
83 # expand history expansion for verification
84 setopt HIST_VERIFY
85 # save timestamp and runtime as well
86 setopt EXTENDED_HISTORY
87 # write line to history file when finished, not when started, to have correct runtime
88 setopt INC_APPEND_HISTORY_TIME
89
90 setopt NO_CLOBBER
91 setopt CORRECT
92 setopt CORRECT_ALL
93 #unsetopt NOMATCH
94 setopt PRINT_EXIT_VALUE
95
96 setopt AUTO_CONTINUE
97 setopt NO_BG_NICE
98 # display PID when suspending processes as well
99 setopt LONG_LIST_JOBS
100 # Report the status of background jobs immediately, rather than waiting until just before printing a prompt.
101 setopt NOTIFY
102 # Whenever  a  command completion or spelling correction is attempted, make sure the entire command path is hashed first.  This makes the first completion slower but avoids false reports of spelling errors.
103 setopt HASH_LIST_ALL
104 # If unset, the cursor is set to the end of the word if completion is started. Otherwise it stays there and completion is done from both ends.
105 setopt COMPLETE_IN_WORD
106 # use zsh field splitting
107 setopt NO_SH_WORD_SPLIT
108 # unset parameters should cause an error
109 # CONFLICTS WITH ZINIT
110 # CONFLICTS WITH ZGENOM
111 # setopt NO_UNSET
112
113
114 # load before completion system initialization
115 # zinit load 'https://github.com/zsh-users/zsh-completions'
116 zgenom load 'https://github.com/zsh-users/zsh-completions'
117
118 # initialize completion system before loading plugins and external configs
119 source ~/.zsh_comprc
120
121
122 # TODO reconsider this
123 # source /usr/share/autojump/autojump.sh
124
125
126 # autoload all functions defined by me
127 # since only filenames are required we
128 # * follow symlinks
129 # * work only on plainfiles
130 # * take only the filename part without dir
131 autoload ~/.zsh_functions/[^_]*(-.:t)
132
133
134 autoload -Uz vcs_info
135 autoload -Uz zcalc
136 autoload -Uz zargs
137
138
139 # spawn editor on current command line
140 autoload -Uz edit-command-line
141 zle -N edit-command-line
142 bindkey -M vicmd '^X^E' edit-command-line
143 bindkey -M viins '^X^E' edit-command-line
144
145
146 #this mainly sets vars, binds keys, does zle stuff
147 # zinit load 'https://github.com/laurenkt/zsh-vimto'
148 zgenom load 'https://github.com/laurenkt/zsh-vimto'
149
150 # functions and an autoload, should be fine here
151 # zinit load 'https://github.com/MichaelAquilina/zsh-you-should-use'
152 zgenom load 'https://github.com/MichaelAquilina/zsh-you-should-use'
153
154
155 # source ~/.zsh_taskwarrior
156 # source ~/.zsh_functions
157 # source ~/.zsh_functions_media
158 # source ~/.zsh_functions_taskwarrior
159
160
161 # TODO break this up
162 source ~/.zsh_local
163
164 # TODO break this up
165 for f in ~/.env_*(N)
166 do
167         source $f
168 done
169
170
171 #zle -N zle-line-init
172 #zle -N zle-keymap-select
173
174
175 # keybindings might have been changed by plugins, etc.
176 # so they go more to the bottom
177
178
179 # should probably be closer to the bottom than the top?
180 # zinit load 'https://github.com/nojhan/liquidprompt'
181 zgenom load 'https://github.com/nojhan/liquidprompt'
182
183
184 # needs to be loaded close to the end because it hooks into other stuff
185 # see https://github.com/zsh-users/zsh-syntax-highlighting
186 source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
187
188 source /usr/share/doc/fzf/examples/key-bindings.zsh
189 source /usr/share/doc/fzf/examples/completion.zsh
190
191 # Use fd (https://github.com/sharkdp/fd) instead of the default find
192 # command for listing path candidates.
193 # - The first argument to the function ($1) is the base path to start traversal
194 # - See the source code (completion.{bash,zsh}) for the details.
195 _fzf_compgen_path() {
196   fdfind --hidden --follow --exclude ".git" . "$1"
197 }
198
199 # Use fd to generate the list for directory completion
200 _fzf_compgen_dir() {
201   fdfind --type d --hidden --follow --exclude ".git" . "$1"
202 }
203
204 # commands to run after initialization is complete
205 #task awaiting
206 cat ~/.motd
207 # zprof