-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
73 lines (57 loc) · 2.03 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
# Exports {{{
export GITHUB_USER=""
export MANPAGER="less -X" # Don't clear the screen after quitting a manual page
export EDITOR="vim"
export GREP_COLORS="ms=01;32"
export TERM="screen-256color"
# }}}
# Tmux {{{
# Makes creating a new tmux session (with a specific name) easier
function tmuxopen () {
tmux attach -t $1
}
# Makes creating a new tmux session (with a specific name) easier
function tmuxnew() {
tmux new -s $1
}
# makes deleting a tmux session easier
function tmuxkill() {
tmux kill-session -t $1
}
# }}}
# Ruby {{{
function get_ruby_version() {
ruby -v | awk '{print $1 " " $2}'
}
# }}}
eval "$(starship init zsh)"
source ~/.bash_profile
# Alias' {{{
alias vi='vim'
alias r="source ~/.zshrc"
alias tat='tmux new-session -As $(basename "$PWD" | tr . -)'
alias tmuxsrc="tmux souce-file ~/.tmux.conf"
alias tmuxkillall="tmux ls | cut -d : -f 1 | xargs -I {} tmux kill-session -t {}" # tmux kill all sessions
alias ct="ctags -R --exclude=.git --exclude=node_modules"
alias dotfiles="ls -a | grep '^\.' | grep --invert-match '\.DS_Store\|\.$'"
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
# }}}
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*' 'm:{[:lower:][:upper:]}={[:upper:][:lower:]} l:|=* r:|=*'
source /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
autoload -U compinit && compinit
zmodload zsh/zprof
zstyle ':completion::complete:*' use-cache on
zstyle ':completion::complete:*' cache-path ~/.zsh/cache/$HOST