@ -41,6 +41,17 @@ function current_branch() {
echo ${ref#refs/heads/}
}
# easy vim/terminal switch
fancy-ctrl-z () {
if [[ $#BUFFER -eq 0 ]]; then
BUFFER="fg"
zle accept-line
else
zle push-input
zle clear-screen
fi
# open changed files in git index
function gch () {
vim `git status | grep modified | awk '{print $3}'`
@ -36,6 +36,10 @@ SAVEHIST=10000
bindkey '\e[A' history-beginning-search-backward
bindkey '\e[B' history-beginning-search-forward
zle -N fancy-ctrl-z
bindkey '^Z' fancy-ctrl-z
setopt append_history
setopt extended_history
setopt hist_expire_dups_first