3 ms·
One of my favorite bits for saving my own butt: commit more. "Function to commit. function! GitCommit () execute 'write' let message = inpu
by andrewstuart2 11y ago
One of my favorite bits for saving my own butt: commit more.
"Function to commit.
function! GitCommit ()
execute 'write'
let message = input('Enter commit message: ')
execute '!git add ' . bufname('%') . ' && git commit -m ''' . message . ''';'
endfunction
imap <F7> <Esc>:call GitCommit()<CR>
map <F7> <Esc>:call GitCommit()<CR>
- thekemkid 11y agoOMG, I need to add this to my .vimrc. Thanks :D
- leephillips 11y agoHave you tried fugitive (a vim wrapper around git)?