airblade/vim-gitgutter: Git diff signs in the Vim sign column
A Vim plugin which shows git diff markers in the sign column and stages/previews/undoes hunks and partial hunks.
At a glance
- What is it?
- vim-gitgutter marks added, modified and removed lines in Vim and Neovim, and lets you stage or undo hunks without leaving the editor. It is a git-only tool, and the README is explicit about the trade-offs.
- Who is it for?
- Adopt vim-gitgutter if you edit git-tracked files in Vim or Neovim and want per-hunk staging without a separate diff window. Skip it if you use another version control system, since the README points to vim-signify instead, and skip it if your terminal does not report focus events and you cannot set g:gitgutter_terminal_reports_focus=0.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 116 days ago.
- What is it written in?
- Mainly Vim Script, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 14, 2026, and from our analysis. They are not legal advice.
Star history
- airblade/vim-gitgutter8,515 ★ · +4
| Repository | 2026-09-22 | 2026-11-14 |
|---|---|---|
| airblade/vim-gitgutter | 8.5k | 8.5k |
4 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The problem vim-gitgutter solves for Vim users
Editing a tracked file in Vim gives you no visual signal about what changed relative to git. You either run git diff in another pane or you guess. vim-gitgutter puts that information in the sign column: added, modified and removed lines get their own signs, and the plugin claims the signs are always up to date without ever saving your buffer. The target user is someone who already works inside Vim or Neovim and wants the diff state visible at the moment of editing, not after a context switch. The name comes from a Sublime Text 3 plugin that inspired this one in 2013, so the design predates most modern editor integrations. It is git only. The README says so directly and recommends vim-signify for other version control systems.
How the diff signs and hunk staging actually work
The plugin diffs your buffer against the index by default, or against any commit you choose. It runs those diffs asynchronously where the editor allows it, and it fires a GitGutter User autocommand after updating the signs, plus a GitGutterStage autocommand after staging a hunk or part of a hunk. Those two events are the integration surface for anything you want to run alongside the plugin. Staging works at hunk granularity and below: you can stage a whole hunk or a partial hunk, preview a hunk before deciding, and undo a hunk. One asymmetry is stated plainly in the README: you cannot unstage a staged hunk. The preview highlights intra-line changes, so a modified line shows which region inside it moved. The plugin also handles file moves and renames, honours git's assume unchanged bit, handles clean/smudge filters, and deals with line endings correctly even in repos that do CRLF conversion. It preserves signs from other plugins, which matters if you run several sign-based extensions at once.
Installing vim-gitgutter with Vim's built-in package support
The README gives two install paths. For Vim, clone into the pack directory and generate helptags. This is the whole installation, with no plugin manager required.
mkdir -p ~/.vim/pack/airblade/start
cd ~/.vim/pack/airblade/start
git clone https://github.com/airblade/vim-gitgutter.git
vim -u NONE -c "helptags vim-gitgutter/doc" -c qFor Neovim the equivalent commands target the nvim config directory.
mkdir -p ~/.config/nvim/pack/airblade/start
cd ~/.config/nvim/pack/airblade/start
git clone https://github.com/airblade/vim-gitgutter.git
nvim -u NONE -c "helptags vim-gitgutter/doc" -c qAfter installing, the README says to check two options. The delay before markers appear is governed by updatetime, whose default is 4000 milliseconds, and the author suggests around 100ms instead. Note that updatetime also controls how long Vim waits before writing its swap file. The signcolumn option can take any value except 'no'. With those set, open a file tracked by git, change a line, and the signs appear after the configured delay. Jumping between hunks uses ]c and [c, and the default leader mappings for preview, stage and undo are <leader>hp, <leader>hs and <leader>hu. You can rebind them through the plugin's <Plug> mappings, for example:
nmap ]h <Plug>(GitGutterNextHunk)
nmap [h <Plug>(GitGutterPrevHunk)Where vim-gitgutter stops working or gets in the way
The git-only constraint is the biggest boundary. If your project lives in Mercurial, Subversion or Fossil, this plugin does nothing for you and the README says to use vim-signify instead. The second constraint is the FocusGained event. The plugin relies on it, and if your terminal does not report focus events you must either use something like Terminus or set g:gitgutter_terminal_reports_focus=0. Inside tmux you also need set -g focus-events on in your tmux.conf. Neither of these is optional; without them the signs can go stale when you return to a window. Third, the README states that you cannot unstage a staged hunk, so the plugin is not a complete replacement for git's own staging workflow in the other direction. Fourth, on Windows there is a real hazard: cmd.exe prioritises the current folder over PATH, so a file named git.* in your working directory is executed instead of git whenever the plugin shells out. The suggested mitigation is setting g:gitgutter_git_executable to the full path, and the README admits the author does not know the correct escaping for that path. Finally, on older Vims (pre 8.1.0614 and Neovim pre 0.4.0) the plugin suppresses signs when a file has more than 500 changes, configurable through g:gitgutter_max_signs, whose default is -1 on newer versions.
vim-gitgutter compared with vim-fugitive and vim-signify
The closest alternative in the same ecosystem is vim-fugitive, and the difference is one of shape rather than feature count. Fugitive is a full git interface inside Vim: you run :Git commands, open status buffers, commit, and inspect history. vim-gitgutter is narrower and passive. It draws signs in the sign column, offers hunk navigation, and stages or undoes hunks. It does not try to be your git client. The README notes one point of cooperation: the plugin does the right thing when viewing revisions with fugitive's :0Gclog, so the two are designed to coexist rather than compete. If you want a status buffer and commit workflow, fugitive is the tool. If you only want to see what changed while you type, vim-gitgutter is the smaller dependency. The other alternative is vim-signify, which the README itself recommends for non-git version control systems. Signify supports several VCS backends; vim-gitgutter trades that breadth for git-specific behaviour such as clean/smudge filters and CRLF conversion handling.
Maintenance, licence and upgrade cost
The repository is not archived, and the last push was on 2026-07-21. The licence is MIT, which places few obligations on users beyond retaining the copyright notice and permission text; this is not legal advice, and anyone redistributing the plugin should read the LICENCE file in the repository root. Upgrading is cheap because installation is a git clone. Pulling the latest commit in the pack directory is the whole update, and the plugin has no build step. The compatibility floor is stated as Vim 7.4 and probably 7.3, so older environments are not immediately excluded, though line number highlighting requires Vim 8.2.3874 or Neovim 0.3.2 or higher. The configuration surface is broad (signs, sign column, line and line number highlights, mappings, extra git-diff arguments), and the README documents enable, disable and toggle commands at both global and buffer scope, so an upgrade that changes defaults is something you would notice. The repository has no published GitHub releases, so there is no changelog to review before pulling.
Editorial conclusion
Adopt vim-gitgutter if you edit git-tracked files in Vim or Neovim and want per-hunk staging without a separate diff window. Skip it if you use another version control system, since the README points to vim-signify instead, and skip it if your terminal does not report focus events and you cannot set g:gitgutter_terminal_reports_focus=0. Before relying on it, confirm your updatetime value and that your signcolumn option is not set to 'no', because updatetime governs the delay before markers appear and signcolumn cannot be 'no'.
Frequently asked questions
Can I use vim-gitgutter with Neovim?
Yes. The README gives a Neovim install path under ~/.config/nvim/pack/airblade/start, and line number highlighting requires Neovim 0.3.2 or higher. On Neovim versions before 0.4.0 the plugin also suppresses signs above 500 changes by default.
Is vim-gitgutter an alternative to vim-fugitive?
It covers a different scope. vim-gitgutter shows diff signs and stages or undoes hunks, while fugitive is a full git interface. The README states the plugin does the right thing when viewing revisions with fugitive's :0Gclog, so they are meant to be used together.
Why are the vim-gitgutter signs not appearing?
Two settings are involved. The delay is governed by updatetime, which defaults to 4000 milliseconds, and the README suggests around 100ms. The signcolumn option can have any value except 'no'. The plugin also relies on the FocusGained event, so a terminal that does not report focus events needs g:gitgutter_terminal_reports_focus=0.
Does vim-gitgutter work with version control systems other than git?
No. The README states the plugin supports git only and recommends vim-signify if you work with other version control systems.
Can vim-gitgutter unstage a hunk?
No. The README says you cannot unstage a staged hunk. You can preview, stage and undo hunks, and stage partial hunks, but unstaging is not supported.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/airblade-vim-gitgutter)Star history chart for your README
[](https://hysenlabs.com/projects/airblade-vim-gitgutter)Was this useful?