Created
March 9, 2015 10:49
-
-
Save anonymous/1c4dcd46ebb4d061df66 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# emacsキーバインドを使用 | |
bindkey -e | |
setopt ignore_eof | |
# 補完 | |
setopt COMPLETE_IN_WORD | |
# コピペ時PROMPTを消す | |
setopt TRANSIENT_RPROMPT | |
# BEEPを消す | |
setopt NO_BEEP | |
autoload -U colors; colors | |
autoload -U compinit; compinit | |
zstyle ':completion:*:default' menu select=1 | |
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}' | |
# Prompt {{{ | |
setopt PROMPT_SUBST | |
autoload -Uz vcs_info | |
zstyle ':vcs_info:*' enable git | |
zstyle ':vcs_info:git:*' check-for-changes true | |
zstyle ':vcs_info:git:*' stagedstr "+" | |
zstyle ':vcs_info:git:*' unstagedstr "-" | |
zstyle ':vcs_info:*' formats '[%b%m%u%c]' | |
zstyle ':vcs_info:*' actionformats '[%b|%a]' | |
precmd () { | |
psvar=() | |
LANG=en_US.UTF-8 vcs_info | |
[[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_" | |
DEFAULT=$'%F{green}[%D{%m/%d %T}]%f → ' | |
ERROR=$'%F{red}[%D{%m/%d %T}]%f → ' | |
PROMPT=$'%(?.${DEFAULT}.${ERROR}) ' | |
RPROMPT="%1(v|%F{red}%1v%f|) %F{cyan}%d%f %F{magenta}%n%f" | |
} | |
# }}} | |
ZSH_SYNTAX_HIGHLIGHTING_PATH="$HOME/.zsh-syntax-highlighting" | |
if [ -d "$ZSH_SYNTAX_HIGHLIGHTING_PATH" ]; then | |
source "$ZSH_SYNTAX_HIGHLIGHTING_PATH/zsh-syntax-highlighting.zsh" | |
fi | |
# History {{{ | |
HISTFILE=~/.zsh_history | |
HISTSIZE=100000000 | |
SAVEHIST=${HISTSIZE} | |
setopt hist_ignore_dups | |
setopt hist_ignore_space | |
setopt share_history | |
autoload history-search-end | |
zle -N history-beginning-search-backward-end history-search-end | |
zle -N history-beginning-search-forward-end history-search-end | |
bindkey "^p" history-beginning-search-backward-end | |
bindkey "^n" history-beginning-search-forward-end | |
# }}} | |
ZSH_COMPLETIONS=/usr/local/share/zsh-completions | |
if [ -d $ZSH_COMPLETIONS ]; then | |
fpath=("$ZSH_COMPLETIONS/src" $fpath) | |
fi | |
if [ -r ~/.zshrc.local ]; then | |
. ~/.zshrc.local | |
fi | |
# vim: fdm=marker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment