-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.zshrc
96 lines (76 loc) · 2.15 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# Lines configured by zsh-newuser-install
HISTFILE=~/.shellhistory
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory nomatch
unsetopt autocd beep
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/ingvij/.zshrc'
autoload bashcompinit
autoload -Uz compinit
bashcompinit
compinit
zstyle ':completion:*' menu select=2
# End of lines added by compinstall
alias vim=$(which nvim)
alias svim="sudo $(which nvim)"
if [[ -v NVIM ]]; then
export EDITOR='nvb'
else
export EDITOR='nvr -cc vnew --remote-wait-silent'
fi
alias h='nvr -o'
alias v='nvr -O'
alias t='nvr --remote-tab'
alias _='nvr -c'
alias _pwd='nvr -c "tcd `pwd`"'
export TERM=xterm-256color
compctl -/ -W $CODE sd
compctl -/ -W $AUR_DIR aur up
setopt PROMPT_SUBST
source /etc/profile
source ~/.local/bin/_fns
antidote=${ZDOTDIR:-$HOME}/.antidote
zsh_plugins=${ZDOTDIR:-$HOME}/.zsh_plugins
if [[ ! ${zsh_plugins}.zsh -nt ${zsh_plugins}.txt ]]; then
(
source ${antidote}/antidote.zsh
antidote bundle <${zsh_plugins}.txt >${zsh_plugins}.zsh
)
fi
source ${zsh_plugins}.zsh
fzf-history-widget-accept() {
fzf-history-widget
zle accept-line
}
zle -N fzf-history-widget-accept
bindkey '^X^R' fzf-history-widget-accept
bindkey '^n' autosuggest-accept
source /usr/share/fzf/key-bindings.zsh
source /usr/share/fzf/completion.zsh
source <(helm completion zsh)
source <(apko completion zsh)
# Options to fzf command
export FZF_COMPLETION_OPTS='--border --info=inline'
_fzf_compgen_path() {
fd --hidden --follow --exclude ".git" . "$1"
}
_fzf_compgen_dir() {
fd --type d --hidden --follow --exclude ".git" . "$1"
}
_fzf_comprun() {
local command=$1
shift
case "$command" in
cd) fzf "$@" --preview 'tree -C {} | head -200' ;;
export|unset) fzf "$@" --preview "eval 'echo \$'{}" ;;
ssh) fzf "$@" --preview 'dig {}' ;;
*) fzf "$@" ;;
esac
}
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
eval "$(starship init zsh)"