Commit Graph

95 Commits

Author SHA1 Message Date
Andy Stewart
ba21c56129 Expand docs on how to close a hunk preview window
See #784.
2021-05-24 09:44:56 +01:00
Andy Stewart
d249be7f3c Update help doc
See #718.
2021-02-08 12:52:31 +00:00
Andy Stewart
ff9d134f0c Add help file modeline 2021-01-26 11:12:56 +00:00
Andy Stewart
bf813bb990 Add some troubleshooting steps 2020-11-24 09:44:51 +00:00
Andy Stewart
a1f9f1f728 Suggest a command instead of a map for opening quickfix
See #676, #749.
2020-11-20 10:46:03 +00:00
Andy Stewart
15b19020b4 Document how to open quickfix list after :GitGutterQuickFix
See #676, #749.
2020-11-20 10:00:41 +00:00
obcat
987a33355e Show message like "Hunk 4 of 11" after hunk jumping 2020-11-05 16:43:52 +00:00
Hexin
098b9c82e9 Add help tag to Vim help file 2020-08-31 10:17:45 +01:00
shinjiro-sugita
81d209ffec update(doc/gitgutter.txt): Document sign removed above and below 2020-07-28 10:01:32 +01:00
Andy Stewart
25942fbf9a Document sign removed above and below
Closes #723.
2020-07-27 15:10:24 +01:00
Andy Stewart
51a03d4ae0 Add option for <Esc> to close non-floating preview window
Closes #718.
2020-06-23 15:18:25 +01:00
Andy Stewart
76d1cf609d Do not set background on existing GitGutter* highlights unless requested
If GitGutter* highlight groups already exist, they were declared
deliberately (either by the colorscheme maintainer or the user).  So do
not adjust them.

However if you would like to make the signs' backgrounds match the sign
column, you can do this:

    let g:gitgutter_set_sign_backgrounds = 1
2020-04-30 19:43:02 +01:00
Andy Stewart
0da302c28a Do not adjust SignColumn highlight
This was introduced in 07d7c9d4 because many colorschemes at the time
had ugly sign columns, and people kept asking how to deal with it.

These days there are many more plugins which use the sign column and
consequently more colorschemes pay attention to the SignColumn highlight
group.

Therefore it no longer makes sense for vim-gitgutter to adjust the
sign column's appearance.

To restore the previous behaviour, add this to your vimrc:

    highlight! link SignColumn LineNr

See #696.
2020-04-30 19:41:09 +01:00
Andy Stewart
ea14301cb4 Default to not limiting number of signs on newer Vims
The limit on the maximum number of signs was introduced when Vim's sign
drawing code was much slower than it is now.

See #681.
2020-04-27 10:09:22 +01:00
Andy Stewart
70855aa93d Enable turning off limit on maximum number of signs
Setting the variable to a known value (-1) is neater than an arbitrary
high number.

See #681.
2020-04-27 10:02:03 +01:00
Andy Stewart
8db2fc5da0 Set correct background on existing GitGutter* highlight groups
Previously if the user or the colourscheme had already defined
GitGutter* highlight groups, the plugin would leave their backgrounds
alone.  This pushed the responsibility for figuring out and specifying
the correct backgrounds onto the user or colourscheme maintainer.

With this change the plugin now sets the correct background on existing
GitGutter* highlight groups.

Also, the documentation was simplified so it is clearer how to set your
own colours for the signs.
2020-04-25 11:17:34 +01:00
Andy Stewart
9e99a78271 Document the reason for the name gitgutter 2020-04-23 09:02:22 +01:00
Andy Stewart
3599736179 Fire GitGutterStage User event after staging
Closes #698.
2020-04-23 08:59:26 +01:00
Andy Stewart
0e509fb0ac Set diff base when viewing file versions with Fugitive
When you look at previous versions of a file, e.g. with Fugitive's
:0Gclog, gitgutter will set the diff base to the current version's
parent so that diff markers appear as expected.

Thannks to @rcreasi for the idea and initial implementation.
2020-03-12 10:38:58 +00:00
Andy Stewart
9add23a492 Document how to get diff stats in statusline
Closes #674.
2020-01-15 11:50:47 +00:00
Andy Stewart
91bd300021 Document 'updatetime' also controlling writing of swap files.
See #672.
2020-01-06 11:52:07 +00:00
Richard Robbins
d36686e6a5 Add g:gitgutter_use_location_list option 2019-11-22 13:25:40 +02:00
tamago324
b97acf2c8a Fix typo in doc 2019-11-20 13:14:38 +02:00
Andy Stewart
1725c13add Simplify installation instructions 2019-10-01 10:39:23 +01:00
Andy Stewart
0469b8435a Deprecate <Plug>... maps in favour of <Plug>(...) 2019-09-04 08:56:36 +01:00
Andy Stewart
88d396f1b4 Add :GitGutterQuickFix command.
It loads all hunks into the quickfix list.

Closes #617.
2019-08-28 11:59:19 +01:00
Andy Stewart
3d71ac7e14 Fix duplicate tag. 2019-08-28 10:24:58 +01:00
Andy Stewart
2980a162fc Minor docs update. 2019-08-28 09:23:39 +01:00
Andy Stewart
8bafd08ef4 Support diffs relative to the working tree.
Closes #558.
2019-08-28 09:22:06 +01:00
Andy Stewart
67c8cca890 Support Vim's popup windows for hunk previews.
Note this prevents staging partial hunks via the previw window.
2019-08-27 16:56:30 +01:00
Andy Stewart
f0f56b9569 Use floating windows for hunk previews on Neovim. 2019-08-27 16:02:51 +01:00
Andy Stewart
77fb3fd81e Enable :w in preview window to stage the hunk. 2019-08-21 10:27:23 +01:00
Andy Stewart
c351eb13cf Update docs. 2019-08-16 16:38:32 +01:00
Andy Stewart
afe94ede1b Do not use a dummy sign to keep the sign column open.
This removes the g:gitgutter_sign_column_always option.

Vim 7.4.2201 introduced the |signcolumn| option to configure when the
signcolumn is visible, building in behaviour which the plugin provided
manually.

Although it would be good to maintain this feature for older Vims, the
complexity added by the code outweighs the benefit of backward
compatibility.
2019-08-16 12:06:28 +01:00
Andy Stewart
b036fcf527 Stage part of any hunk.
See #279.
2019-08-13 15:57:22 +01:00
Andy Stewart
bc1d28db46 Allow staging part of an additions-only hunk.
See #279.
2019-08-12 17:19:05 +01:00
Andy Stewart
fef14f1d49 Ignore non-gitgutter signs by default on Neovim >= 0.4.0
See #627.
2019-08-12 10:03:59 +01:00
Dan Aloni
9bf988bd1d Add g:gitgutter_sign_allow_clobber to control clobbering.
I.e. how gitgutter handles non-gitgutter signs.

See #565, #627.

Co-authored-by: Andy Stewart <boss@airbladesoftware.com>
2019-08-10 07:29:15 +01:00
Andy Stewart
de200ffdd4 Document cmd.exe vulnerability where it can execute the wrong git.
See #508, #538.
2019-08-10 06:16:13 +01:00
delphinus
c9ef2cd3d0 Fix typo in existent doc 2019-08-08 16:40:35 +01:00
delphinus
eb89ba52dc Add doc for highlighting line numbers 2019-08-08 16:40:35 +01:00
Andy Stewart
e564c28b6a Add link in docs. 2019-08-08 16:32:18 +01:00
homestar
8985017094 Add g:gitgutter_preview_win_location option 2019-08-08 16:31:44 +01:00
Andy Stewart
e5936a22cf Fix tmux command. 2019-05-15 16:27:17 +01:00
Andy Stewart
a6174df8a2 Document getting focus events in tmux.
Solution by @astier.  Thanks!

See #612.
2019-05-15 16:25:45 +01:00
Andy Stewart
afa4f2ddf0 Use the Diff* highlight groups by default.
This change makes the plugin default to using the highlight groups
defined by the colorscheme instead of hardcoding its own foreground
colours.

If you liked the previous colours you can restore them by adding these
lines to your vimrc:

highlight GitGutterAdd    guifg=#009900 guibg=<X> ctermfg=2 ctermb=<Y>
highlight GitGutterChange guifg=#bbbb00 guibg=<X> ctermfg=3 ctermb=<Y>
highlight GitGutterDelete guifg=#ff2222 guibg=<X> ctermfg=1 ctermb=<Y>

– where you should replace <X> and <Y> are the background colour of your
SignColumn in the gui and the terminal respectively.

For example, with the solarized colorscheme and a dark background,
guibg=#073642 and ctermbg=0.

Closes #545, #560.
2019-01-25 17:27:08 +00:00
Andy Stewart
ac787afa02 Add GitGutterFold command.
Closes #286, #571.
2019-01-14 11:48:24 +00:00
Andy Stewart
d2d2da11c5 Add g:gitgutter_git_args for args to git when running git-diff.
See #541, #546.
2018-07-31 14:28:36 +01:00
Martin Bukatovic
a986ab0547 Update FAQ in vim doc: refresh on file save 2018-06-01 21:31:52 +02:00
Andy Stewart
c39a5c240a Add g:gitgutter_terminal_reports_focus to enable FocusGained workaround.
See #490.
2018-02-28 15:09:36 +00:00