]> git.netwichtig.de Git - user/henk/vcsh/zsh.git/blob - .zshrc
refactor plugin loading
[user/henk/vcsh/zsh.git] / .zshrc
1 # zprof only makes sense at the very top
2 # zmodload zsh/zprof
3
4
5 # exports are usually independent and standalone
6 # so they can stay at the top
7
8 # where to write history
9 export HISTFILE=~/.zsh_history
10 export HISTSIZE=1000000000
11 export SAVEHIST=1000000000
12
13 export ANSIBLE_NOCOWS=1
14 export ANSIBLE_STRATEGY=mitogen_linear
15
16 # what is that for exactly? maybe taskwarrior? or timewarrior?
17 REPORTTIME=10
18
19 ## define word characters (for stuff like backward-word, forward-word, backward-kill-word,..)
20 ## these are NOT separators but chars considered part of a word
21 #WORDCHARS='*?_-.[]~=/&;!#$%^(){}<>' # the default
22
23 # zsh you-should-use
24 export YSU_MODE=ALL
25
26 # I want sbin executables available
27 export PATH=${PATH}:/usr/local/sbin:/sbin:/usr/sbin
28 export PATH=${PATH}:~/bin
29
30 # colors for newt/whiptail (for debconf, needrestart, etc.)
31 # works better with selenized colorscheme
32 export NEWT_COLORS='checkbox=yellow,;roottext=yellow,'
33
34 # where zsh looks for functions
35 fpath=(~/.zsh_functions $fpath)
36
37
38 # hashed directories are usually independent and standalone
39 # so they can stay at the top
40 hash -d diary=~/Data/henksfiles/workinprogress/Dokumente/diary
41 hash -d lifedocs=~/Data/henksfiles/workinprogress/Dokumente/Leben
42 hash -d bewerbung=~/Data/personal/henk/workinprogress/Dokumente/Arbeit/bewerbung
43 hash -d rezepte=~/Data/henksfiles/workinprogress/Dokumente/rezepte/cuisine
44 hash -d templates=~/Data/henksfiles/workinprogress/templates
45 hash -d gitignore=~/Data/public/software/gitignore
46 hash -d doc=/usr/share/doc
47 hash -d TODO=~/Data/henksfiles/TODO/
48 hash -d fortunes=~/Data/henksfiles/workinprogress/Dokumente/fortunes/
49
50
51 # aliases are usually independent and standalone
52 source ~/.zsh_aliases
53 # TODO break this up or make functions or get rid?
54 source ~/.zsh_qemu
55
56
57 # load plugin manager after all 'static' stuff is done
58 source ~/Data/public/software/zinit/zinit.zsh
59
60
61 # mostly static stuff, env vars
62 zinit load 'https://github.com/joel-porquet/zsh-dircolors-solarized'
63 zinit load "https://github.com/greymd/tmux-xpanes"
64
65
66 # load sane options plugin before setting my own options
67 zinit load 'https://github.com/willghatch/zsh-saneopt'
68
69 # options are usually independent and standalone
70 # so they can stay at the top
71 setopt AUTO_CD
72 setopt CHASE_LINKS
73
74 setopt AUTO_NAME_DIRS
75
76 setopt BRACE_CCL
77 #setopt EXTENDED_GLOB
78 setopt MARK_DIRS
79 setopt NUMERIC_GLOB_SORT
80 setopt RC_EXPAND_PARAM
81 #setopt WARN_CREATE_GLOBAL
82 setopt GLOB_DOTS
83
84 # remove previous entries from history
85 setopt HIST_IGNORE_ALL_DUPS
86 # do not write lines starting with a space to history file
87 setopt HIST_IGNORE_SPACE
88 # Remove superfluous blanks
89 setopt HIST_REDUCE_BLANKS
90 # expand history expansion for verification
91 setopt HIST_VERIFY
92 # save timestamp and runtime as well
93 setopt EXTENDED_HISTORY
94 # write line to history file when finished, not when started, to have correct runtime
95 setopt INC_APPEND_HISTORY_TIME
96
97 setopt NO_CLOBBER
98 setopt CORRECT
99 setopt CORRECT_ALL
100 #unsetopt NOMATCH
101 setopt PRINT_EXIT_VALUE
102
103 setopt AUTO_CONTINUE
104 setopt NO_BG_NICE
105 #setopt LONG_LIST_JOBS
106
107
108 # load before completion system initialization
109 zinit load 'https://github.com/zsh-users/zsh-completions'
110
111 # initialize completion system before loading plugins and external configs
112 source ~/.zsh_comprc
113
114
115 # TODO reconsider this
116 # source /usr/share/autojump/autojump.sh
117
118
119 # autoload all functions defined by me
120 # since only filenames are required we
121 # * follow symlinks
122 # * work only on plainfiles
123 # * take only the filename part without dir
124 autoload ~/.zsh_functions/[^_]*(-.:t)
125
126
127 autoload -Uz vcs_info
128 autoload -Uz zcalc
129 autoload -Uz zargs
130
131
132 # spawn editor on current command line
133 autoload -Uz edit-command-line
134 zle -N edit-command-line
135 bindkey -M vicmd '^X^E' edit-command-line
136 bindkey -M viins '^X^E' edit-command-line
137
138
139 #this mainly sets vars, binds keys, does zle stuff
140 zinit load 'https://github.com/laurenkt/zsh-vimto'
141
142 # functions and an autoload, should be fine here
143 zinit load 'https://github.com/MichaelAquilina/zsh-you-should-use'
144
145
146 # source ~/.zsh_taskwarrior
147 # source ~/.zsh_functions
148 # source ~/.zsh_functions_media
149 # source ~/.zsh_functions_taskwarrior
150
151
152 # TODO break this up
153 source ~/.zsh_local
154
155 # TODO break this up
156 source ~/.env_*
157
158
159 typeset -U path
160
161 #zle -N zle-line-init
162 #zle -N zle-keymap-select
163
164
165 # keybindings might have been changed by plugins, etc.
166 # so they go more to the bottom
167
168
169 # should probably be closer to the bottom than the top?
170 zinit load 'https://github.com/nojhan/liquidprompt'
171
172
173 # needs to be loaded close to the end because it hooks into other stuff
174 # see https://github.com/zsh-users/zsh-syntax-highlighting
175 zinit load 'https://github.com/zsh-users/zsh-syntax-highlighting'
176
177
178 # commands to run after initialization is complete
179 #task awaiting
180 cat ~/.motd
181 # zprof