-
Notifications
You must be signed in to change notification settings - Fork 12
/
.zshrc
52 lines (42 loc) · 1.11 KB
/
.zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# typeset -F SECONDS
# autoload -Uz add-zsh-hook
# add-zsh-hook precmd print_startup_time
#
# print_startup_time () {
# print -n "Startup time: "
# echo $SECONDS
#
# # Clean up.
# add-zsh-hook -d precmd print_startup_time
# unset startup_timer_module_path
# }
source ~/.zgenom/sources/init.zsh;
alias grep="grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn}";
alias lvim="fnm use 19 && lvim";
# Config
setopt interactivecomments;
export CLICOLOR=1;
export EDITOR="lvim";
# History search
bindkey '^[[B' history-substring-search-down;
bindkey '^[[A' history-substring-search-up;
HISTORY_SUBSTRING_SEARCH_PREFIXED="1";
# Ctrl+r config for fzf
if type rg &> /dev/null; then
export FZF_DEFAULT_COMMAND="rg --files";
export FZF_DEFAULT_OPTS="-m";
fi
# Run the previous command as sudo, thanks gh:cdfuller!
alias pls='sudo $(fc -nl -1)';
turbo () {
zcompile ~/.zshrc;
[ -f ~/.fzf.zsh ] && zcompile ~/.fzf.zsh;
}
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh;
# Lvim
export PATH=$HOME/.local/bin:$PATH
# After-hook
if [ -f ~/.zshrc_local_after ]; then
source ~/.zshrc_local_after;
fi;
eval "$(direnv hook zsh)"