Skip to content

Instantly share code, notes, and snippets.

@ikr7
Created August 24, 2017 14:29
Show Gist options
  • Save ikr7/e266e25eea772d1c247f804289594680 to your computer and use it in GitHub Desktop.
Save ikr7/e266e25eea772d1c247f804289594680 to your computer and use it in GitHub Desktop.
LANG=ja_JP.UTF-8
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$PATH # ふつうの
export PATH=/usr/local/opt/coreutils/libexec/gnubin:$PATH # coreutils
export PATH=$HOME/.nodebrew/current/bin:$PATH # nodebrew
export PATH=/Library/TeX/texbin:$PATH # TeX
HISTFILE=~/.zsh_history
HISTSIZE=1000000
SAVEHIST=1000000
# 右プロンプトは最終行にのみ出す
setopt transient_rprompt
# ディレクトリ名だけで cd
setopt auto_cd
# = の後でもパスを補完
setopt magic_equal_subst
# スペルチェック
setopt correct
# プロンプトで色使うために
autoload -U colors && colors
# ゆのっちプロンプト
PROMPT=%(?."%{${fg[green]}%}✘╹◡╹✘%{${reset_color}%} > "."%{${fg[magenta]}%}✘╹﹏╹✘%{${reset_color}%} > ")
# 右プロンプトで pwd
RPROMPT="%~"
# 補完
autoload -U compinit && compinit
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
# エイリアス各位
alias ls="/usr/local/opt/coreutils/libexec/gnubin/ls --color -F"
alias gs="git status"
alias gb="git branch -a"
alias gc="git checkout"
# ディレクトリ作ってそこに行く
take() {
mkdir $1 && cd $1
}
# 大学の VPN に接続する
daigaku_vpn() {
sudo openconnect --user=16x3009 vpn.hosei.ac.jp
}
# 履歴絞り込み
peco_history() {
BUFFER=$(history -n 1 | tac | peco)
CURSOR=$#BUFFER
BUFFER=$BUFFER
}
zle -N peco_history
bindkey '^r' peco_history
# virtualenvセットアップ
# export WORKON_HOME=$HOME/.virtualenvs
# source /usr/local/bin/virtualenvwrapper.sh
# rbenvのinitialization
eval "$(rbenv init -)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment