Vim Tip #19: gitgutter and Friends


tags: Vim

Vim Tips

I use vim-gitgutter ( ) in NeoVim, which adds a column on the left of the editor to show what lines are added, removed, or changed from the last git commit. If I were starting again, I might use vim-signify ( ) - which does the same thing, except it supports multiple other version control systems as well. If you're wondering why I'd need anything other than git (git is definitely the most popular VCS right now and arguably the best), I have to use SVN at work.

Another plus in favour of gitgutter is that the author has been very responsive. He works on Linux (as do I - at least at home), but at work I use a Mac. Versioning of free software on Macs is constrained by Homebrew and tends to go at different rates than on Linux, so I've been in touch with him three times(?) over the last couple years about cross-version feature problems and he's always taken care of it quickly.

If you want full-blown git handling inside (Neo)Vim, you could try Fugitive: . I think it provides the same status column, but it also provides many of the features of git. I've passed on it because I'm quite familiar with the git command line and Fugitive appears to require you to learn a lot more inside-Vim commands to do similar things: but if you haven't installed any of these yet, you should take a look because maybe it's what you need.