1 # zprof only makes sense at the very top
5 # settings for the zsh don’t get exported
7 # where to write history
8 HISTFILE=~/.zsh_history
12 # print time needed for execution when it takes longer than this value
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
24 # where zsh looks for functions
25 fpath=(~/.zsh_functions $fpath)
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/
41 # aliases are usually independent and standalone
43 # TODO break this up or make functions or get rid?
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.
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"
62 # options are usually independent and standalone
63 # so they can stay at the top
72 setopt NUMERIC_GLOB_SORT
73 setopt RC_EXPAND_PARAM
74 #setopt WARN_CREATE_GLOBAL
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
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
94 setopt PRINT_EXIT_VALUE
98 # display PID when suspending processes as well
100 # Report the status of background jobs immediately, rather than waiting until just before printing a prompt.
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.
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
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'
118 # initialize completion system before loading plugins and external configs
122 # TODO reconsider this
123 # source /usr/share/autojump/autojump.sh
126 # autoload all functions defined by me
127 # since only filenames are required we
129 # * work only on plainfiles
130 # * take only the filename part without dir
131 autoload ~/.zsh_functions/[^_]*(-.:t)
134 autoload -Uz vcs_info
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
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'
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'
155 # source ~/.zsh_taskwarrior
156 # source ~/.zsh_functions
157 # source ~/.zsh_functions_media
158 # source ~/.zsh_functions_taskwarrior
171 #zle -N zle-line-init
172 #zle -N zle-keymap-select
175 # keybindings might have been changed by plugins, etc.
176 # so they go more to the bottom
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'
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
188 source /usr/share/doc/fzf/examples/key-bindings.zsh
189 source /usr/share/doc/fzf/examples/completion.zsh
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"
199 # Use fd to generate the list for directory completion
201 fdfind --type d --hidden --follow --exclude ".git" . "$1"
204 # commands to run after initialization is complete