-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc.symlink
75 lines (59 loc) · 1.92 KB
/
zshrc.symlink
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
export DOTFILES=$HOME/.dotfiles
export ZSH=$DOTFILES/zsh
command_exists() {
type "$1" > /dev/null 2>&1
}
# display how long all tasks over 10 seconds take
export REPORTTIME=10
# Base16 shell setup
BASE16_SHELL=$HOME/.config/base16-shell/
[ -n "$PS1" ] && [ -s $BASE16_SHELL/profile_helper.sh ] && eval "$($BASE16_SHELL/profile_helper.sh)"
# define the code directory. this is where my code exists and where I want the `c`
# autocomplete to work from exclusively
if [[ -d ~/code ]]; then
export CODE_DIR=~/code
fi
# source all .zsh files inside of the zsh/ directory
for config ($ZSH/**/*.zsh) source $config
if [[ -a ~/.zshrc_local ]]; then
source ~/.zshrc_local
fi
# initialize autocomplete
autoload -U compinit add-zsh-hook
compinit
for config ($ZSH/**/*.zsh) source $config
export EDITOR='nvim'
export GIT_EDITOR='nvim'
# adding path directory for custom scripts
export PATH=$PATH:$DOTFILES/bin
# add a config file for ripgrep (rg)
export RIPGREP_CONFIG_PATH="$HOME/.rgrc"
# inserted by fzf install
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export FZF_DEFAULT_COMMAND='rg --files --no-ignore --hidden --follow -g "!{.git,node_modules}/*" 2> /dev/null'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
# add color to man pages
export MANROFFOPT='-c'
export LESS_TERMCAP_mb=$(tput bold; tput setaf 2)
export LESS_TERMCAP_md=$(tput bold; tput setaf 6)
export LESS_TERMCAP_me=$(tput sgr0)
export LESS_TERMCAP_so=$(tput bold; tput setaf 3; tput setab 4)
export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7)
export LESS_TERMCAP_ue=$(tput rmul; tput sgr0)
export LESS_TERMCAP_mr=$(tput rev)
export LESS_TERMCAP_mh=$(tput dim)
# if [ -z "$TMUX" ]; then
# export TERM=xterm-256color-italic
# else
# export TERM=tmux-256color-italic
# fi
# nnn - enable cd on quit (Q)
export NNN_TMPFILE="/tmp/nnn"
n() {
nnn "$@"
if [ -f $NNN_TMPFILE ]; then
. $NNN_TMPFILE
rm $NNN_TMPFILE
fi
}