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