Commit 4d6e1ba3 authored by Moritz Sokoll's avatar Moritz Sokoll 💬
Browse files

wrote stuff to README.md

parent df2a489a
# vim-git-control
## a simple git integration for vim
`vim-git-control` provides simple integration for committing, pushing and checking out branches for git within vim
## Installation
preferred use is with [plugin-manager](https://gitlab.sokoll.com/moritz/plugin-manager). Just download the `it-control.vim` and move it into
`~/.vim/plugins`. Then add the plugin to your plugins list.
" Name: git-control
" Author: Moritz Sokoll
" Description: a git version conrol integration for vim
" Description: a git version control integration for vim
if exists('g:git_control_loaded')
finish
......@@ -17,5 +17,24 @@ function! Git_Commit()
endif
endfunction
function! Git_Push()
let stat = system('git push')
endfunction
function! Git_Checkout()
let branch_name = input('branch: ')
echo ''
if len(branch_name) < 1
echo 'branch name too short'
elseif matchstr(branch_name, ' ') == ' '
echo 'branch names cannot have spaces in them'
else
let stat = system('git checkout -b ' . branch_name)
echo stat
endif
endfunction
command! GitCommit call Git_Commit()
command! GitPush call Git_Push()
command! GitCheckout call Git_Checkout()
let g:git_control_loaded = 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment