Skip to content

Instantly share code, notes, and snippets.

@esc
Created April 26, 2013 22:20
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 esc/5470837 to your computer and use it in GitHub Desktop.
Save esc/5470837 to your computer and use it in GitHub Desktop.
Zsh zle widget for git commit
gc () {
LBUFFER="git commit -m \""
RBUFFER="\""
}
zle -N gc gc
bindkey '^gc' gc
@Feh
Copy link

Feh commented Apr 27, 2013

#2012-06-06: quick git commands
  bindkey -s "^G " "git diff\n"
  bindkey -s "^G^@" "git diff\n"  # ctrl-space
  bindkey -s "^G." "git diff --cached\n"
  bindkey -s "^G^G" "git status\n"
  bindkey -s "^Gc" "git commit -v\n"
  bindkey -s "^Ga" "git add \t"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment