Skip to content

Instantly share code, notes, and snippets.


tawachan/.zshrc Secret

Last active October 29, 2019 09:12
What would you like to do?
# コマンド履歴
setopt hist_ignore_dups # ignore duplication command history list
setopt share_history # share command history data
export ZPLUG_HOME=/usr/local/opt/zplug
source $ZPLUG_HOME/init.zsh
zplug "zsh-users/zsh-syntax-highlighting", defer:2
zplug "zsh-users/zsh-autosuggestions"
zplug "zsh-users/zsh-history-substring-search", hook-build:"__zsh_version 4.3"
zplug "zsh-users/zsh-completions"
zplug "mafredri/zsh-async", from:github
zplug "hchbaw/auto-fu.zsh"
zplug "b4b4r07/enhancd",
zplug "b4b4r07/zsh-gomi", if:"which fzf"
zplug "junegunn/fzf-bin", as:command, from:gh-r, rename-to:fzf
export FZF_DEFAULT_OPTS='--height 40% --reverse --border --preview "cat {}"'
zplug "plugins/git", from:oh-my-zsh
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
# Install plugins if there are plugins that have not been installed
if ! zplug check --verbose; then
printf "Install? [y/N]: "
if read -q; then
echo; zplug install
# Then, source plugins and add commands to $PATH
zplug load --verbose
function peco-history-selection() {
BUFFER=`history -n 1 | tail -r | awk '!a[$0]++' | peco`
zle reset-prompt
zle -N peco-history-selection
bindkey '^R' peco-history-selection
# private settings
## GO
export GOPATH=$HOME/go
export GOENV_ROOT=$HOME/.goenv
export PATH=bin:$GOENV_ROOT/bin:$GOPATH/bin:$PATH
eval "$(goenv init -)"
# rbenv
export RBENV_ROOT="$HOME/.rbenv"
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
export PATH="$HOME/.nodenv/bin:$PATH"
eval "$(nodenv init -)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment