-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc.tmpl
60 lines (44 loc) · 1.76 KB
/
dot_zshrc.tmpl
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
# Enables profiling in zsh
[[ -n $PROFILE_ZSH ]] && zmodload zsh/zprof
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Disable auto update to prevent messing up chezmoi state
# Zsh will be refreshed every week, however, to force it use: $ chezmoi -R apply
DISABLE_AUTO_UPDATE="true"
# move to the folder if it exists using the name of the folder as a command
setopt auto_cd
setopt AUTO_PUSHD # Push the current directory visited on the stack.
setopt PUSHD_IGNORE_DUPS # Do not store duplicates in the stack.
setopt PUSHD_SILENT # Do not print the directory stack after pushd or popd.
# allow to use absolute path from anywhere on the system to the following locations
cdpath=($HOME/work $HOME/personal $HOME)
# Enable plugins
plugins=(git zsh-vi-mode zsh-syntax-highlighting zsh-autosuggestions asdf fzf)
ZSH_DISABLE_COMPFIX=true source $ZSH/oh-my-zsh.sh
# Import aliases, functions and custom exports source $DOTFILES_PATH/shell/init.sh
source "${HOME}/aliases.sh"
source "${HOME}/functions.sh"
# load z/rupa script
. "${HOME}/z.sh"
if command -v direnv &> /dev/null
then
eval "$(direnv hook zsh)"
fi
if command -v starship &> /dev/null
then
eval "$(starship init zsh)"
fi
# Default escape key <ESC> for insert mode
ZVM_VI_INSERT_ESCAPE_BINDKEY='^['
# The plugin will auto execute this zvm_after_init function
function zvm_after_init() {
zvm_bindkey viins 'jk' zvm_exit_insert_mode
zvm_bindkey viins 'kj' zvm_exit_insert_mode
# Rebind history search, fix for:
# https://github.com/jeffreytse/zsh-vi-mode/issues/127
zvm_bindkey viins '^R' fzf-history-widget
}
#Override the default macos ruby bin with the brew one just when asdf installation fails
{{ if eq .chezmoi.os "darwin" -}}
{{ end -}}
[[ -n $PROFILE_ZSH ]] && zprof