-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
75 lines (56 loc) · 1.89 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
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:$PATH
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
eval "$(rbenv init -)"
# Add volta to $PATH
export VOLTA_HOME=$HOME/.volta
export PATH=$HOME/.volta/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
export PATH="$PATH:/Users/mergul/nvim-osx64/bin"
ZSH_THEME="awesomepanda" # set by `omz`
# Add the bin folder to $PATH before the plugins load
PATH=$HOME/.local/bin:$PATH
# Uncomment the following line to use case-sensitive completion.
CASE_SENSITIVE="true"
zstyle ':omz:update' mode reminder # just remind me to update when it's time
plugins=(git rails ruby node rbenv zsh-autosuggestions zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='mvim'
fi
# Example aliases
alias zshconfig="vi ~/.zshrc"
alias ohmyzsh="vi ~/.oh-my-zsh"
# Export TMUX config file
export TMUX_CONFIG="~/.config/tmux/.tmux/.tmux.conf"
# TMUX aliases
alias tn="tmux -u -f $TMUX_CONFIG new"
alias ta="tmux -u -f $TMUX_CONFIG attach"
#alias tt="nvim $TMUX_CONFIG"
# fzf vim setup
if type rg &> /dev/null; then
export FZF_DEFAULT_COMMAND='rg --files'
export FZF_DEFAULT_OPTS='-m --height 50% --border'
fi
# default vim command to nvim command
alias vim="nvim"
alias vi="nvim"
alias mvim="nvim"
# remove duplicate entires from $PATH
deduplicate_path() {
# Convert PATH to a list with newline-separated entries
local old_path=$PATH
local new_path=$(echo "$old_path" | tr ':' '\n' | awk '!seen[$0]++' | tr '\n' ':' | sed 's/:$//')
# Export the deduplicated PATH
export PATH=$new_path
}
# Call the function
deduplicate_path
# this is needed for the zsh-syntax-highlighting
source $ZSH_CUSTOM/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
eval "$(atuin init zsh)"