diff --git a/.vimrc b/.vimrc index f4ab7f4..4665bef 100644 --- a/.vimrc +++ b/.vimrc @@ -33,8 +33,27 @@ Plugin 'vim-airline/vim-airline-themes' Plugin 'bling/vim-bufferline' " Version control notes in the line number bar Plugin 'mhinz/vim-signify' + " Git wrapper Plugin 'tpope/vim-fugitive' +" fugitive git bindings +" borrowed from https://www.reddit.com/r/vim/comments/21f4gm/best_workflow_when_using_fugitive/ +nnoremap ga :Git add %:p +nnoremap gs :Gstatus +nnoremap gc :Gcommit -v -q +nnoremap gt :Gcommit -v -q %:p +nnoremap gd :Gdiff +nnoremap ge :Gedit +nnoremap gr :Gread +nnoremap gw :Gwrite +nnoremap gl :silent! Glog:bot copen +nnoremap gp :Ggrep +nnoremap gm :Gmove +nnoremap gb :Git branch +nnoremap go :Git checkout +nnoremap gps :Dispatch! git push +nnoremap gpl :Dispatch! git pull + " Think of sensible.vim as one step above 'nocompatible' mode: a universal " set of defaults that (hopefully) everyone can agree on. Plugin 'tpope/vim-sensible'