Skip to content

Instantly share code, notes, and snippets.

@c9s
Created July 4, 2014 08:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save c9s/39d47eaa2a68455a4a16 to your computer and use it in GitHub Desktop.
Save c9s/39d47eaa2a68455a4a16 to your computer and use it in GitHub Desktop.
# zsh config here
zmodload -a colors
zmodload -a autocomplete
zmodload -a complist
autoload -U colors
autoload -U promptinit
autoload -Uz vcs_info
# zstyle ':vcs_info:git*' formats "(%s) %6.6i %c%u %b%m"
# zstyle ':vcs_info:git*' actionformats "(%s|%a) %6.6i %c%u %b%m"
zstyle ':vcs_info:*' enable git hg svn
zstyle ':vcs_info:(git*|svn*|hg*):*' get-revision true
zstyle ':vcs_info:*' check-for-changes true
zstyle ':vcs_info:git*+set-message:*' hooks git-st git-stash
zstyle ':vcs_info:*' formats \
'%F{1}(%f%s:%F{2}%b%F{1})%c%u%f'
zstyle ':vcs_info:*' actionformats \
'%F{1}(%f%s:%F{2}%b%F{3}|%F{1}%a%F{1})%f '
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3} %r'
precmd() {
vcs_info
}
colors
vcs_info
promptinit
# PROMPT='%F{5}[%F{2}%n%F{5}] %F{3}%3~ ${vcs_info_msg_0_}%f%# '
# prompt
# PS1=$'%{\e[0;37m%}%B%*%b %{\e[0;35m%}%m:%{\e[0;37m%}%~ %(!.#.>) %{\e[00m%}'
# PROMPT='%{$fg_bold[green]%}%n@%m %{$fg[blue]%}%c %{$fg_bold[red]%}$(git_prompt_info)%{$fg[blue]%} %% %{$reset_color%}'
# PROMPT='%{$fg_bold[green]%}-%m-%n- ~=~=~ $VIMODE
# $(_shell_title)-%{$fg[red]%}%c %{$fg_bold[red]%}$(git_prompt_info)%{$fg[orange]%} %% %{$reset_color%}'
PROMPT='%F{green}%B%K{green}█▓▒░%F{black}%K{green}%B%n@%m%b%F{green}%K{black}█▓▒░%F{white}%K{black}%B %D{%a %b/%d} %D{%PM %H:%M:%S}
%}%F{fadebar}%K{black}%B%~/%b%k%f %{$fg_bold[red]%}${vcs_info_msg_0_}%{$fg[orange]%} %% %{$reset_color%}'
setopt autocd
setopt autolist automenu nobeep
setopt multios
setopt auto_continue
setopt correct
setopt list_packed
setopt prompt_subst
setopt pushd_ignore_dups
setopt extendedglob
# This will set the default prompt to the walters theme
# prompt walters
# prompt fire
# COMPLETION {{{
# The following lines were added by compinstall
fpath=(~/.zsh/completion $fpath)
zstyle ':completion:*' completer _complete _approximate _prefix
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' list-prompt '[%p] %l'
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*' max-errors 1
zstyle ':completion:*' menu select=1
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
zstyle ':completion::complete:*' use-cache on
zstyle ':completion:*' verbose true
zstyle :compinstall filename '/Users/c9s/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# }}}
export GREP_OPTIONS='--exclude-dir=.git --exclude-dir=.svn '
setopt APPEND_HISTORY
setopt INC_APPEND_HISTORY
setopt EXTENDED_HISTORY
setopt HIST_FIND_NO_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_REDUCE_BLANKS
setopt HIST_IGNORE_SPACE
setopt HIST_NO_STORE
setopt HIST_NO_FUNCTIONS
setopt NO_HIST_BEEP
setopt HIST_SAVE_NO_DUPS
export HISTFILE=~/.zsh_history
export HISTIGNORE="&:ls:[bf]g:exit:reset:clear:cd:cd ..:cd.."
export HISTSIZE=55000
export SAVEHIST=55000
setopt append_history
setopt inc_append_history
setopt hist_allow_clobber
setopt hist_ignore_all_dups # dont record dupes in history
setopt hist_ignore_dups
setopt hist_ignore_space
setopt hist_reduce_blanks
setopt hist_save_no_dups
setopt hist_verify
setopt csh_junkie_history
# setopt share_history
#
# zle-line-init() { zle -K vicmd; }
# zle -N zle-line-init
#
function zle-keymap-select {
VIMODE="${${KEYMAP/vicmd/ M:command}/(main|viins)/}"
zle reset-prompt
}
zle -N zle-keymap-select
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment