Skip to content

Commit

Permalink
add Github command (need cho45 hack : http://subtech.g.hatena.ne.jp/c…
Browse files Browse the repository at this point in the history
  • Loading branch information
Sixeight committed May 18, 2008
1 parent 6d5fefd commit 10b4e4c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions git-support.vim
@@ -1,11 +1,15 @@

" TODO: 別のディレクトリにいる時でも正常に動作するようにする。
" cdすれば良いだけなので近いうちにやる

command Gitinit :!git init
command Gitadd :!git add %
command Gitcommit :call <SID>GitCommit()
command Gitpush :call <SID>GitPush()
command Gitstatus :!git status
command Gitdiff :!git diff
command Gitlog :!git log
command Github :!git hub

nmap <leader>gi :Gitinit<cr>
nmap <leader>ga :Gitadd<cr>
Expand All @@ -14,16 +18,11 @@ nmap <leader>gp :Gitpush<cr>
nmap <leader>gs :Gitstatus<cr>
nmap <leader>gd :Gitdiff<cr>
nmap <leader>gl :Gitlog<cr>
nmap <leader>gh :Github<cr>
func! s:GitCommit()
let msg = input('commit message > ')
if msg == ''
" TODO: When no commit message processes
" let res = confirm('no commit message?', "&Ok\n&No")
" if res == 1
" else
" return
" endif
echohl ErrorMsg
echo 'no commit message'
echohl None
Expand Down

0 comments on commit 10b4e4c

Please sign in to comment.