Skip to content

Instantly share code, notes, and snippets.

@atpons
Created October 26, 2016 01:34
Show Gist options
  • Select an option

  • Save atpons/4a1b4691a86400107376e9a2d07f2916 to your computer and use it in GitHub Desktop.

Select an option

Save atpons/4a1b4691a86400107376e9a2d07f2916 to your computer and use it in GitHub Desktop.
########################
# _ #
# ____ ___ | |__ #
# |_ / / __| | '_ \ #
# / / \__ \ | | | | #
# /___| |___/ |_| |_| #
# #
########################
# OS Depended
case ${OSTYPE} in
darwin*)
#MAC
# MacVim
alias vim='/Applications/MacVim.app/Contents/MacOS/mvim'
# Ruby - Rbenv
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# Python - pyenv (Mac)
export PYENV_ROOT=${HOME}/.pyenv
if [ -d "${PYENV_ROOT}" ]; then
export PATH=${PYENV_ROOT}/bin:$PATH
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
;;
linux*)
# PATH
# export PATH=
;;
esac
# Universal
# Japanese
export LANG=ja_JP.UTF-8
# Color Scheme
autoload -Uz colors
colors
# Auto Completion
autoload -Uz compinit
compinit
# Keybind (Vim)
bindkey -v
# History Sharing
setopt share_history
# History Deletion (Double)
setopt histignorealldups
HISTFILE=~/.zsh_hisotry
HISTSIZE=19000
SAVEHIST=10000
# Auto cd
setopt auto_cd
# pushd
setopt auto_pushd
# Extended glob
setopt extended_glob
# Completion Selecting of TAB Key
zstyle ':completion:*:default' menu select=1
# Prompt Settings
# もしかして機能
setopt correct
# PCRE 互換の正規表現を使う
setopt re_match_pcre
# プロンプトが表示されるたびにプロンプト文字列を評価、置換する
setopt prompt_subst
# プロンプト指定
PROMPT="
[%n@${HOST}] %{${fg[yellow]}%}%~%{${reset_color}%}
%(?.%{$fg[green]%}.%{$fg[blue]%})%(?!(*'-') <!(*;-;%)? <)%{${reset_color}%} "
# プロンプト指定(コマンドの続き)
PROMPT2='[%n]> '
# もしかして時のプロンプト指定
# GIT
autoload -Uz vcs_info
setopt prompt_subst
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' stagedstr "%F{yellow}!"
zstyle ':vcs_info:git:*' unstagedstr "%F{red}+"
zstyle ':vcs_info:*' formats "%F{green}%c%u[%b]%f"
zstyle ':vcs_info:*' actionformats '[%b|%a]'
precmd () { vcs_info }
RPROMPT=$RPROMPT'${vcs_info_msg_0_}'
SPROMPT="%{$fg[red]%}%{$suggest%}(*'~'%)? < もしかして %B%r%b %{$fg[red]%}かな? [そう!(y), 違う!(n),a,e]:${reset_color} "
# Git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment