-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.zshrc
71 lines (56 loc) · 1.45 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
# # Show system info on startup
# neofetch
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
fi
# Enable Vim mode
bindkey -v
# Disable Ex mode with ':' - I don't like when zsh vim mode enters _execute mode
bindkey -rM vicmd ':'
# Delete with backspace in insert mode
bindkey "^?" backward-delete-char
# Change cursor shape between beam and block
function zle-keymap-select {
if [[ ${KEYMAP} == vicmd ]] ||
[[ $1 = 'block' ]]; then
echo -ne '\e[1 q'
elif [[ ${KEYMAP} == main ]] ||
[[ ${KEYMAP} == viins ]] ||
[[ ${KEYMAP} = '' ]] ||
[[ $1 = 'beam' ]]; then
echo -ne '\e[5 q'
fi
}
zle -N zle-keymap-select
# Use beam shape cursor on startup.
zle-line-init() {
zle -K viins
echo -ne '\e[5 q'
}
zle -N zle-line-init
# Use beam shape cursor for each new prompt.
preexec() { echo -ne '\e[5 q' ;}
# Pyenv
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
# Aliases
# alias vim="nvim"
# alias ls="exa"
# alias la="exa -la"
alias lg="lazygit"
alias wt="wezterm"
# Set TERM back to xterm-256color without italics when working with ssh
alias ssh='TERM=xterm-256color ssh'
# Initiate starship prompt
eval "$(starship init zsh)"
# pnpm
export PNPM_HOME="/Users/pedropmedina/Library/pnpm"
export PATH="$PNPM_HOME:$PATH"
# pnpm end
# Golang
export PATH=$PATH:$(go env GOPATH)/bin
# Cargo/rust
. "$HOME/.cargo/env"
. "$HOME/.local/bin/env"