Last active
August 29, 2015 14:16
-
-
Save helenvholmes/3e91ec21c403c3b9b7ed to your computer and use it in GitHub Desktop.
AutoCommand: Prompt for commit message on save (Vim)
This file contains hidden or 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
autocmd BufWritePost * let message = input('Commit message: ', '' . expand('')) | execute ':silent ! if git rev-pars e --git-dir > /dev/null 2>&1 ; then git add % ; git commit -m ' . shellescape(message, 1) . '; fi > /dev/null 2>&1' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment