git-control.vim 442 Bytes
Newer Older
Moritz Sokoll's avatar
Moritz Sokoll committed
1
2
3
4
5
6
7
8
9
10
" Name: git-control
" Author: Moritz Sokoll
" Description: a git version conrol integration for vim

if exists('g:git_control_loaded')
	finish
endif

function! Git_Commit()
	let commit_message = input('commit message: ')
Moritz Sokoll's avatar
ye    
Moritz Sokoll committed
11
12
	if len(commit_message) < 1
		echo len(commit_message)
Moritz Sokoll's avatar
Moritz Sokoll committed
13
14
15
16
17
18
	else
		let stat = system("git commit -am '" . commit_message . "'")
		echo stat
	endif
endfunction

Moritz Sokoll's avatar
ye    
Moritz Sokoll committed
19
command GitCommit call Git_Commit()
Moritz Sokoll's avatar
Moritz Sokoll committed
20
let g:git_control_loaded = 1