-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
84 lines (69 loc) · 2.28 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
# _
# | |
# _______| |__ _ __ ___
# |_ / __| '_ \| '__/ __|
# _ / /\__ \ | | | | | (__
# (_)___|___/_| |_|_| \___|
# Baylen's .zshrc, created 4.29.24
bindkey -v # Vi-mode
# Add vi-like bindings
zmodload zsh/complist
bindkey -M menuselect 'h' vi-backward-char
bindkey -M menuselect 'k' vi-up-line-or-history
bindkey -M menuselect 'l' vi-forward-char
bindkey -M menuselect 'j' vi-down-line-or-history
# Add command-editing in vim
autoload -Uz edit-command-line
zle -N edit-command-line
bindkey -M vicmd v edit-command-line
# Case-insensitive TAB-completion
autoload -Uz compinit && compinit
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
# Load other aliases and functions if present
[ -f "$HOME/.config/shell/aliases.sh" ] && \
source "$HOME/.config/shell/aliases.sh"
[ -f "$HOME/.config/shell/functions.sh" ] && \
source "$HOME/.config/shell/functions.sh"
[ -f "$HOME/.config/shell/functions/*" ] && \
source "$HOME/.config/shell/functions/*"
[ -f "$HOME/.config/shell/aliases/*" ] && \
source "$HOME/.config/shell/aliases/*"
# Aliases
alias rsh='source $HOME/.zshrc'
alias nav='navi'
alias weather='curl wttr.in'
alias mu='ncmpc'
alias yt='ytfzf'
alias ..='cd ..'
alias w3m='w3m -o confirm_qq-false'
# WeeChat
alias irc='weechat'
# Newsraft
alias n='newsraft'
# Check if nvim is installed
if command -v nvim &>/dev/null; then
alias v='nvim'
alias vi='nvim'
alias vim='nvim'
fi
# ls
if ls --version >/dev/null 2>&1; then # GNU
alias ls='ls -A -h -p --color=auto --group-directories-first'
else # Non-GNU
alias ls='ls -Ahp --color=auto'
fi
alias ll='ls -l' # Display long ls
alias grep='grep --color=auto' # Add color to grep
alias mkdir='mkdir -pv' # Always create parent directories and be verbose
alias mk='mkdir -pv' # mk is short for mkdir
alias cp='cp -iv' # Always ask for confirmation and be verbose
alias mv='mv -iv' # Always ask for confirmation and be verbose
alias rm='rm -iv'
# Plugins
if [ -f "/opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]; then
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
fi
# zoxide (Must be at the end of file)
eval "$(zoxide init zsh)"
# Starship prompt
#eval "$(starship init zsh)"