Created
February 10, 2012 20:33
-
-
Save itspriddle/1792596 to your computer and use it in GitHub Desktop.
Launch GitX from Vim
This file contains 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
" drop in ~/.vim/plugins or add to ~/.vimrc | |
" Requires https://github.com/tpope/vim-fugitive | |
function! s:GitX(...) | |
silent exe '!gitx --git-dir='.b:git_dir.' '.join(a:000) | |
redraw! | |
endfunction | |
augroup gitx | |
autocmd! | |
" :Gitx - Open GitX | |
autocmd User Fugitive command! -buffer -nargs=* Gitx call s:GitX(<q-args>) | |
" :Gstage - Opens GitX on stage view | |
autocmd User Fugitive command! -buffer Gstage call s:GitX('-c') | |
augroup END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment