-
Notifications
You must be signed in to change notification settings - Fork 2
/
zshrc
88 lines (67 loc) · 2.57 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
85
86
87
88
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="gallifrey"
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git)
# Unix specific bin paths
export PATH=$HOME/.bin:/usr/local/bin:/usr/local/sbin:$PATH
############
# Some useful aliases
############
#$1: path to search recursively
#$2: word to look for
gref() {
grep -rnw $1 -e $2
}
# Highlight files and copy to clipboard
# style=monokai for dark bg, style=tango for light bg
#function hl() {
#PYGMENTS_NODE_COMMAND=node pygmentize -f rtf -O style=tango,fontface=Inconsolata,font_size=42 $* | sed 's;\\f0;\\f0\\fs84;g' | tr -d '\n' | sed 's;\\par}$;};' | pbcopy
#}
#function hljs() {
#hl -l jsx $*
#}
# pbpaste | hljs -> If you highlight js
# pbpaste | hl -> For everything else
#Load OS specific configurations
if [[ `uname` = 'Darwin' ]]; then
#Prevent visual bugs because of german encoding
LANG=en_US.UTF-8
LC_ALL=en_US.UTF-8
alias flow='$(npm-which flow)'
alias eslint='$(npm-which eslint)'
export PATH=/usr/local/share/npm/bin:$PATH
export PATH=~/.scripts:$PATH
export PATH=/usr/texbin:$PATH
elif [[ `uname` = 'Linux' ]]; then
export PATH="$PATH:/opt/node/bin"
fi
command -v nvim > /dev/null 2>&1 && { alias vim='nvim'; alias nvimdiff='nvim -d'; }
#Somehow this needs git
export GIT_EDITOR=vim
#Load the nvm path cache, if it exists
#This file is created with the custom .bin/cacheNvm script
#NVM_ENV_CACHE=~/.nvm_env_cache
#if [ -f "$NVM_ENV_CACHE" ]; then
#export PATH=$(cat $NVM_ENV_CACHE):${PATH}
#fi
#Load local configuration not populated in the dotfiles repo
[[ -s $HOME/.zshrc.local ]] && source $HOME/.zshrc.local
#Initialize the Oh-My-Zsh framework
source $ZSH/oh-my-zsh.sh
#Fuzzy finder configuration
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# tabtab source for serverless package
# uninstall by removing these lines or running `tabtab uninstall serverless`
#[[ -f /Users/ryyppy/.config/yarn/global/node_modules/tabtab/.completions/serverless.zsh ]] && . /Users/ryyppy/.config/yarn/global/node_modules/tabtab/.completions/serverless.zsh
# tabtab source for sls package
# uninstall by removing these lines or running `tabtab uninstall sls`
#[[ -f /Users/ryyppy/.config/yarn/global/node_modules/tabtab/.completions/sls.zsh ]] && . /Users/ryyppy/.config/yarn/global/node_modules/tabtab/.completions/sls.zsh
# fnm
eval "$(fnm env --multi)"