Skip to content

Commit

Permalink
Plugins vim-gitgutter and vim-fugitive
Browse files Browse the repository at this point in the history
These plugins make working with Git a sinch.

vim-gitgutter shows a +/-/~ next to lines that have been added, removed,
and modified, and also shows a summary of the number of lines affected
in vim-airline's statusbar.

vim-fugitive makes working with Git from within Vim incredibly easy.
Here's a lit of common commands and their analogs to the normal git
commands:

- git add                  --> :Gwrite
- git commit               --> :Gcommit
- git push                 --> :Gpush
- git checkout <file name> --> :Gread
- git blame                --> :Gblame
- ... many more!
  • Loading branch information
jez committed Feb 25, 2015
1 parent 8d4223f commit 1e5757e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions vimrc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ Plugin 'majutsushi/tagbar'
Plugin 'kien/ctrlp.vim'
Plugin 'vim-scripts/a.vim'

" ----- Working with Git ----------------------------------------------
Plugin 'airblade/vim-gitgutter'
Plugin 'tpope/vim-fugitive'

call vundle#end()

filetype plugin indent on
Expand Down Expand Up @@ -102,3 +106,11 @@ nmap <silent> <leader>b :TagbarToggle<CR>
" Uncomment to open tagbar automatically whenever possible
"autocmd BufEnter * nested :call tagbar#autoopen(0)


" ----- airblade/vim-gitgutter settings -----
" Required after having changed the colorscheme
hi clear SignColumn
" In vim-airline, only display "hunks" if the diff is non-zero
let g:airline#extensions#hunks#non_zero_only = 1


2 comments on commit 1e5757e

@jez
Copy link
Owner Author

@jez jez commented on 1e5757e Feb 26, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(<-- prev step) ... (next step -->)

vim-fugitive is one of those plugins that you almost definitely have to read the docs for. It gives you a lot of commands for using common Git commands from within Vim. Check out the information here:

https://github.com/tpope/vim-fugitive

@n0nick
Copy link

@n0nick n0nick commented on 1e5757e Feb 26, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.