-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
executable file
·66 lines (55 loc) · 1.71 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
if type direnv > /dev/null; then
eval "$(direnv hook zsh)"
fi
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# OhMyZsh
DOTFILES=$HOME/.dotfiles
ZSH=$DOTFILES/ohmyzsh
ZSH_THEME="powerlevel10k/powerlevel10k"
HYPHEN_INSENSITIVE="true"
DISABLE_AUTO_UPDATE="true"
HIST_STAMPS="yyyy-mm-dd"
ZSH_CUSTOM=$DOTFILES/zsh
ZSH_AUTOSUGGEST_STRATEGY=(
completion
match_prev_cmd
history
)
export LESS="-FRX"
export SYSTEMD_LESS="$LESS"
if type nvim > /dev/null; then
export EDITOR=nvim
fi
# If on remote machine, autostart/automagically attach to tmux
[[ "$(hostname)" =~ "server|pi|thegreatbelow" ]] && ZSH_TMUX_AUTOSTART=true
plugins=(
compleat
zsh-autosuggestions
zsh-syntax-highlighting
zsh-vim-mode
alias-finder
command-not-found
common-aliases
git
mosh
nmap
systemd
tmux
)
# Load zmv, a powerful mv with batch capabilities
autoload -Uz zmv
source $ZSH/oh-my-zsh.sh
# Overrides vim-modes' settings which seem to be incompatible with syntax-highlighting
autoload -U up-line-or-beginning-search
zle -N up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey -M viins '^[OA' up-line-or-beginning-search
bindkey -M vicmd '^[OA' up-line-or-beginning-search
bindkey -M viins '^[OB' down-line-or-beginning-search
bindkey -M vicmd '^[OB' down-line-or-beginning-search