1

I have airblade/vim-gitgutter installed via Vundle. Somehow even with minimal .vimrc vim-gitgutter signs aren't working. My minimal .vimrc is given below, is there any problem there? Any help will be appreciated.

set number relativenumber
set updatetime=1000

filetype off

set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()


Plugin 'VundleVim/Vundle.vim'
Plugin 'airblade/vim-gitgutter'

call vundle#end()
filetype indent plugin on

Edit: I have edited .vimrc; :PluginList shows Vundle and vim-gitgutter. echo g:loaded_gitgutter gives 1 and echo exists(':GitGutterToggle') gives 2. Still signs aren't working.

10
  • That is not a minimal vimrc. You need to create a vimrc with only the lines relevant to the plugin installation. So remove the highlighting groups, your GitStatus function, get rid of nocompatible (just because it's useless if you have a vimrc). Then show us what :PluginList returns to make sure you actually installed the plugin. Then show us what echo g:loaded_gitgutter and echo exists(':GitGutterToggle') returns to see if it's only the signs which don't work or the plugin which is not loaded.
    – statox
    Jun 2 '20 at 7:55
  • 1
    Then try to follow what :h sign-commands says to place a sign by yourself to see if the issue comes from the plugin or from your setup which can't show any sign. Also we need to make sure that you are in a directory holding an actual git repo with some unchecked changes otherwise there is no signs to display. Basically help us to help you, give us relevant information otherwise it is impossible to debug your config for you.
    – statox
    Jun 2 '20 at 7:56
  • @statox I have edited my question and added information. Jun 2 '20 at 16:35
  • 1
    @MahbubAlam Oh yes they are. But the plugin you have installed handles this specific use case. Jun 4 '20 at 20:06
  • 1
    @MahbubAlam what would you like to achieve? There are plugins that do not require git and add signs for those. For example github.com/mhinz/vim-signify or my github.com/chrisbra/changesPlugin But it really depends what you actually want to achieve and what you want the signs to show. You should clarify your question (and read the documentation of plugins you installed!) Jun 5 '20 at 5:50
0

As @Christian Brabandt says, vim-gitgutter only shows signs for files which are tracked by git. That's why it has "git" in the name.

If you have files in a git repo, and the files have unstaged changes, and you are not seeing signs, please open an issue on the plugin's repo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.