I've installed gitgutter and want to have it off by default. The documentation says use
:GitGutterDisable
to do this. And if I'm in a vim session this works. However I want to add this to my vimrc to make it permanent.
I've tried adapting other plugin commands within vimrc such as
let g:GitGutterDisable
and various other combinations but can't get the damn thing to turn off. I also looked in ~/.vim/bundle/vim-gitgutter/plugin/gitgutter.vim and fiddled with a few settings there.
I got close with setting the below to zero
call s:set('g:gitgutter_enabled', 1)
but this just permanently turned it off, ie :GitGutterSignsToggle on the vim command line no longer worked
Your vimrc loads before any plugins are available. That means, that commands, that are defined by plugins are not yet defined. Therefore, I would advise to use the VimEnter autocommand like this:
:au VimEnter * :GitGutterDisable
As of this writing, from https://vimawesome.com/plugin/vim-gitgutter
To turn off vim-gitgutter by default
Add
let g:gitgutter_enabled = 0to your ~/.vimrc.
For example in ~/.vimrc on systems that don't have git I use
if executable('git')
let g:gitgutter_highlight_lines = 1 " Turn on gitgutter highlighting
else
let g:gitgutter_git_executable = '/bin/true'
let g:gitgutter_enabled = 0
endif
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With