Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In vim airline, only show git branch, not changes to file

I'm using vim with airline. I like that airline shows me the git branch, but I don't want it to show me the lines added/removed/changed. What should I add to my ~/.vimrc file to change that? I know I need to set g:airline_section_b but I'm not quite sure what to set it to.

I tried this, but the syntax is clearly wrong, because it didn't work.

let g:airline_section_b = airline#section#create(['branch'])
like image 305
Lorin Hochstein Avatar asked Oct 11 '25 14:10

Lorin Hochstein


1 Answers

From :help airline:

-------------------------------------                        *airline-hunks*
vim-gitgutter <https://github.com/airblade/vim-gitgutter>                   
vim-signify <https://github.com/mhinz/vim-signify>                          
changesPlugin <https://github.com/chrisbra/changesPlugin>                   

* enable/disable showing a summary of changed hunks under source control.
let g:airline#extensions#hunks#enabled = 1

So add

let g:airline#extensions#hunks#enabled=0

to your ~/.vimrc and restart vim.

like image 191
DavidEG Avatar answered Oct 14 '25 06:10

DavidEG