Last active
October 5, 2016 10:19
-
-
Save mipmip/44488aa8f7255f13b871c5dd4ce02ac2 to your computer and use it in GitHub Desktop.
functions for fast single file vim/fugitive workflow
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
" 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>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For me an enormous timesaver.