functions for fast single file vim/fugitive workflow
" Functions for fast single file vim/fugitive workflow
"
" Add this in your .vimrc and use it like this:
" Just commit current file with message
" :GitCommitWithMessage 'fix typo'
" Commit current file with message and push afterwards
" :GitCommitPushWithMessage 'fix typo'
function! s:GitCommitWithMessage(message)
execute ":Gwrite"
execute ":Gcommit -m ". a:message
endfu
command! -nargs=1 GitCommitWithMessage call s:GitCommitWithMessage(<f-args>)
function! s:GitCommitPushWithMessage(message)
execute ":Gwrite"
execute ":Gcommit -m ". a:message
execute ":Gpush"
endfu
command! -nargs=1 GitCommitPushWithMessage call s:GitCommitPushWithMessage(<f-args>)