# SHORTCUTS:

git_status() { \print; zle accept-line; gsts; zle accept-line }
zle -N git_status
bindkey '^s' git_status

git_diff() { \print; zle accept-line; git diff; zle accept-line }
zle -N git_diff
bindkey '^f' git_diff

git_diff_cached() { \print; zle accept-line; git diff --cached; zle accept-line }
zle -N git_diff_cached
bindkey '^g' git_diff_cached

git_add() { \print; zle accept-line; ga; zle accept-line }
zle -N git_add
bindkey '^p' git_add

# Enable history search via arrow keys.
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "^[[A" up-line-or-beginning-search # Up
bindkey "^[[B" down-line-or-beginning-search # Down

# SHORTCUTS:

git_status() { \print; zle accept-line; gsts; zle accept-line }
zle -N git_status
bindkey '^s' git_status

git_diff() { \print; zle accept-line; git diff; zle accept-line }
zle -N git_diff
bindkey '^f' git_diff

git_diff_cached() { \print; zle accept-line; git diff --cached; zle accept-line }
zle -N git_diff_cached
bindkey '^g' git_diff_cached

git_add() { \print; zle accept-line; ga; zle accept-line }
zle -N git_add
bindkey '^p' git_add

# Enable history search via arrow keys.
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
bindkey "^[[A" up-line-or-beginning-search # Up
bindkey "^[[B" down-line-or-beginning-search # Down

# Add back beginning and end of line shortcuts in Vim mode:
bindkey '^a' vi-beginning-of-line
bindkey '^e' vi-end-of-line

Add back beginning of line and end of line emacs shortcuts even in zsh vim mode.
Add back beginning of line and end of line emacs shortcuts even in zsh vim mode.
