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 # what is that for exactly? maybe taskwarrior? or timewarrior?
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
23 # where zsh looks for functions
24 fpath=(~/.zsh_functions $fpath)
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/
40 # aliases are usually independent and standalone
42 # TODO break this up or make functions or get rid?
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.
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"
61 # options are usually independent and standalone
62 # so they can stay at the top
71 setopt NUMERIC_GLOB_SORT
72 setopt RC_EXPAND_PARAM
73 #setopt WARN_CREATE_GLOBAL
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
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
93 setopt PRINT_EXIT_VALUE
97 # display PID when suspending processes as well
99 # Report the status of background jobs immediately, rather than waiting until just before printing a prompt.
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.
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
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'
117 # initialize completion system before loading plugins and external configs
121 # TODO reconsider this
122 # source /usr/share/autojump/autojump.sh
125 # autoload all functions defined by me
126 # since only filenames are required we
128 # * work only on plainfiles
129 # * take only the filename part without dir
130 autoload ~/.zsh_functions/[^_]*(-.:t)
133 autoload -Uz vcs_info
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
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'
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'
154 # source ~/.zsh_taskwarrior
155 # source ~/.zsh_functions
156 # source ~/.zsh_functions_media
157 # source ~/.zsh_functions_taskwarrior
170 #zle -N zle-line-init
171 #zle -N zle-keymap-select
174 # keybindings might have been changed by plugins, etc.
175 # so they go more to the bottom
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'
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
187 source /usr/share/doc/fzf/examples/key-bindings.zsh
188 source /usr/share/doc/fzf/examples/completion.zsh
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"
198 # Use fd to generate the list for directory completion
200 fdfind --type d --hidden --follow --exclude ".git" . "$1"
203 # commands to run after initialization is complete