Why are the colours in the sign column weird? Unstaging a staged hunk would require showing changes between the index and HEAD, which is out of scope. This plugin is for showing changes between the working tree and the index (and staging/undoing those changes). To customise your sign column's background color, first tell vim-gitgutter to leave it alone: Sign columnīy default vim-gitgutter will make the sign column look like the line number column. Please note that vim-gitgutter won't override any colours or highlights you've set in your colorscheme. Whether or not vim-gitgutter runs asynchronously (defaults to yes).Whether or not vim-gitgutter runs eagerly (defaults to yes).Whether or not vim-gitgutter runs in "realtime" (defaults to yes).Whether or not line highlighting is on initially (defaults to off).Whether or not signs are shown (defaults to yes).Whether or not vim-gitgutter is on initially (defaults to on).Extra arguments for git when running git diff.Whether or not the sign column is shown when there aren't any signs (defaults to no).Use zr to unfold 3 lines of context above and below a hunk.Įxecute GitGutterFold a second time to restore the previous view. Use the GitGutterFold command to fold all unchanged lines, leaving just the hunks visible. See the customisation section below for how to change the defaults. You can configure the threshold with:įinally, you can force vim-gitgutter to update its signs across all visible buffers with :GitGutterAll. As soon as the number of changes falls below the limit vim-gitgutter will show the signs again. To keep your Vim snappy, vim-gitgutter will suppress the signs when a file has more than 500 changes. That is unless you configure the sign column always to be there (see Sign Column section). If you switch off both line highlighting and signs, you won't see the sign column. This is because line highlighting requires signs and Vim always shows the sign column even if the signs are invisible. Note that if you have line highlighting on and signs off, you will have an empty sign column – more accurately, a sign column with invisible signs. toggle with :GitGutterLineHighlightsToggle.turn off with :GitGutterLineHighlightsDisable.turn on with :GitGutterLineHighlightsEnable.You can turn the signs on and off (defaults to on):Īnd you can turn line highlighting on and off (defaults to off): You can explicitly turn vim-gitgutter off and on (defaults to on): You can preview, stage, and undo hunks with hp, hs, and hu respectively. 4 seconds, but I suggest reducing it to around 100ms (add set updatetime=100 to your vimrc). The delay is governed by vim's updatetime option the default value is 4000, i.e. When you make a change to a file tracked by git, the diff markers should appear automatically. Git clone git:///airblade/vim-gitgutter.gitĮdit your plugin manifest ( voom edit) and add: airblade/vim-gitgutterĬopy vim-gitgutter's subdirectories into your vim configuration directory: cd /tmp & git clone git:///airblade/vim-gitgutter.git You install vim-gitgutter like any other vim plugin. If you're compiling Vim yourself you need the 'big' or 'huge' feature set. 1 means you're all set 0 means you need to install a Vim with signs support. A line or lines were removed between lines 25 and 26.īefore installation, please check your Vim supports signs by running :echo has('signs').If your terminal doesn't report focus events, either use something like Terminus or set let g:gitgutter_terminal_reports_focus=0. If you work with other version control systems, I recommend vim-signify. Works with fish shell (in addition to the usual shells).Easy to integrate diff stats into status line built-in integration with vim-airline.Can be toggled on/off, globally or per buffer.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |