Commit Graph

124 Commits

Author SHA1 Message Date
Andy Stewart
c39a5c240a Add g:gitgutter_terminal_reports_focus to enable FocusGained workaround.
See #490.
2018-02-28 15:09:36 +00:00
Andy Stewart
4a66a09658 Document dependency on focus events. 2018-02-28 11:43:00 +00:00
Andy Stewart
4692457ae2 Document how to disable realtime updates. 2018-02-19 14:31:59 +00:00
Andy Stewart
213bd34bdf Mention hunk text object in introduction. 2018-02-15 17:17:23 +00:00
Andy Stewart
d586e4398e Add note about updatetime to troubleshooting section. 2018-02-15 17:16:59 +00:00
Andy Stewart
72b789ea8f Clarify that unstaging staged hunks is out of scope. 2018-02-15 17:16:16 +00:00
Andy Stewart
5bfe5b9209 Big refactor.
- Hunk stage/undo/preview no longer saves the buffer.
- Hunk undo no longer makes locations go out of sync.
- Grep can be opted out of (grep output with ansi escapes is number one cause
  of issues).
- Replaced g:gitgutter_grep_command with g:gitgutter_grep.
- Always runs git-diff the same way instead of in two possible ways.
- Separated detection of git tracking from diffing.
- Simplified path handling.
- Removed support for xolox shell: Windows taskbar does not flash with async
  jobs.
- Removed g:gitgutter_{eager,realtime}.
- Simplified implementation generally.
2018-02-12 14:25:11 +00:00
Andy Stewart
dc73a81bfe Deprecate g:gitgutter_sign_column_always for &signcolumn. 2017-08-02 15:47:04 +01:00
Andy Stewart
dcac1f74ee Add a note about CDPATH.
See #382, #423.
2017-06-08 09:10:48 +01:00
Tyler Brazier
b803a28f47 External commands (:!) update the gutter
Fixes #418
2017-04-28 20:13:09 -05:00
Andy Stewart
9ecce5a269 Do not use --color=never flag for grep.
See #410.
2017-04-03 13:30:23 +01:00
Andy Stewart
092369c19c Use plain grep instead of extended grep.
See #410.
2017-04-03 13:23:50 +01:00
Andy Stewart
562e6043d3 Explain how to cycle through hunks in all buffers. 2017-02-22 10:03:04 +00:00
Billy
efa1ead770 Typo fix. 2016-09-09 09:05:41 +01:00
Luke Farrar
c8fa0b3349 Move -r to start of args for non-GNU folk. 2016-06-21 10:28:56 +01:00
Luke Farrar
88e26c0fdf Fix manual install commands. 2016-06-21 10:28:56 +01:00
Andy Stewart
d19e86d249 Update FAQ in README. 2016-06-21 09:57:39 +01:00
Andy Stewart
09b9144002 Remove obsolete troubleshooting step.
Forgot to do this in 377c71d.
2016-06-09 10:34:52 +01:00
Andy Stewart
cfbca4455c Enable async diffs in gVim 7.4.1850+. 2016-06-09 10:30:48 +01:00
Andy Stewart
90c558b1dc Expand installation instructions. 2016-05-18 16:35:04 +01:00
Andy Stewart
053581db5c MacVim GUI 7.4.1832+ supports async diffs. 2016-05-16 10:10:11 +01:00
Andy Stewart
882073f4b5 Restrict async diffing in Vim to terminal Vim.
MacVim in GUI mode and gVim don't process the callbacks reliably (or at
all) yet.
2016-05-12 10:22:43 +01:00
Andy Stewart
0e490ec830 Require Vim 7.4.1826 for async Vim. 2016-05-09 16:57:43 +01:00
Andy Stewart
65e3ff8994 Fix Markdown link. 2016-04-29 10:25:21 +01:00
Andy Stewart
e607a997ce Asynchronous diffs in Vim. 2016-04-29 09:50:57 +01:00
Andy Stewart
035ea9260c Add section on extensions to README. 2016-04-21 15:57:07 +01:00
Andy Stewart
e48824cd1d Provide a hunk text object. 2016-04-21 14:08:14 +01:00
Andy Stewart
b3db866aab Use "undo" instead of "revert" for discarding a hunk.
"Undo" is a better name than "revert" because:

- "revert" sounds like it has something to do with `git-revert` but they
  are entirely different;
- "undo" is consistent with vim's "undo": discarding changes and going
  back to the original.

Maintain backwards compatibility and add deprecation warnings.

Closes #306.
2016-04-21 11:40:27 +01:00
Andy Stewart
530bf68fca Add option to disable asynchronous diffs.
Closes #318.
2016-04-21 10:29:11 +01:00
Andy Stewart
75eee3e407 Enable diffing against any commit.
Closes #309.
2016-04-20 11:19:34 +01:00
Andy Stewart
0af9f2a3ab Add caveats about grep's --color flag. 2016-02-21 11:22:33 +00:00
Andy Stewart
18b7836168 Neovim: run diffs asynchronously. 2016-02-09 10:11:41 +00:00
Dan Church
3131bdcbb8 Remove feature gitgutter_escape_grep
Reverts feature introduced in 5c23cadf57

In order to use an escaped grep, please replace
`g:gitgutter_escape_grep=1` with:

    let g:gitgutter_grep_command = '\grep --color=never -e'
2016-01-28 15:01:37 +00:00
Dan Church
8d229c222c Clean up exposure of the grep command
This change breaks up the determining of the user's grep command, and
the arguments it sends it.

Configuration is now:

    let g:gitgutter_grep_command = 'grep --color=never -e'

This makes it easier for users to configure now, though not quite as
flexible.
2016-01-28 15:01:37 +00:00
Dan Church
95734c6f6b Add support for option g:gitgutter_grep_command
With this change, setting `g:gitgutter_grep_command` to ' | grep --color=never -e "^@@ "'`
greatly reduces startup time.

Before this change, `diff.vim` was a major bottleneck because it calls
`grep --help`. This is mostly unnecessary except in a few cases where
the user is running a nonstandard version of grep.

`vim --startuptime start.out large_file.sql` before:

    times in msec
     clock   self+sourced   self:  sourced script
     clock   elapsed:              other lines

    000.026  000.026: --- VIM STARTING ---
    [...]
    068.463  003.645  003.500: sourcing /home/dchurch/.vim/plugin/gitgutter.vim
    [...]
    150.957  000.208  000.208: sourcing /home/dchurch/.vim/autoload/gitgutter.vim
    151.294  000.196  000.196: sourcing /home/dchurch/.vim/autoload/gitgutter/utility.vim
    165.059  012.619  012.619: sourcing /home/dchurch/.vim/autoload/gitgutter/diff.vim
    236.901  000.188  000.188: sourcing /home/dchurch/.vim/autoload/gitgutter/hunk.vim
    237.289  000.233  000.233: sourcing /home/dchurch/.vim/autoload/gitgutter/sign.vim
    [...]
    337.673  000.004: --- VIM STARTED ---

After change, and setting `g:gitgutter_grep_command = ' | grep --color=never -e "^@@ "'`:

    000.026  000.026: --- VIM STARTING ---
    [...]
    064.873  002.713  002.591: sourcing /home/dchurch/.vim/plugin/gitgutter.vim
    [...]
    134.109  000.149  000.149: sourcing /home/dchurch/.vim/autoload/gitgutter.vim
    134.337  000.147  000.147: sourcing /home/dchurch/.vim/autoload/gitgutter/utility.vim
    135.411  000.232  000.232: sourcing /home/dchurch/.vim/autoload/gitgutter/diff.vim
    187.831  000.180  000.180: sourcing /home/dchurch/.vim/autoload/gitgutter/hunk.vim
    188.223  000.175  000.175: sourcing /home/dchurch/.vim/autoload/gitgutter/sign.vim
    [...]
    285.008  000.004: --- VIM STARTED ---
2016-01-28 15:01:37 +00:00
Andy Stewart
f52f875fc7 Add caveat about unstaging hunks. 2015-12-16 12:18:11 +00:00
Andy Stewart
134fef6f54 Mention correct handling of line endings.
See #233 for more information.
2015-12-16 12:16:11 +00:00
Andy Stewart
fbc4e3ff02 Clarify how to get started. 2015-12-16 12:00:43 +00:00
Andy Stewart
45f6521f8a Remove fish caveat because fish is supported. 2015-12-16 11:53:01 +00:00
Andy Stewart
28aea43adf Add link to vim-signify. 2015-12-10 11:08:36 +00:00
Andy Stewart
1aed46c072 Add a note about unstaging staged changes. 2015-11-26 09:47:06 +00:00
Andy Stewart
965f8bc101 Add a note about updatetime. 2015-11-26 09:43:06 +00:00
Andy Stewart
beb20d3924 Add note about fish shell. 2015-08-17 09:46:44 +02:00
Andy Stewart
07d7c9d478 Override SignColumn highlight group by default.
Most colorschemes (e.g. solarized) don't give any thought to the
SignColumn highlight group so generally the sign column is ugly.

With this change vim-gitgutter defaults to making the sign column look
like the line number column.

Solarized users no longer need `highlight clear SignColumn` in their
vimrc :)

To stop vim-gitgutter from overriding the SignColumn highlight, add this
to your vimrc:

    let g:gitgutter_override_sign_column_highlight = 0
2015-03-31 16:23:55 +02:00
Andy Stewart
1fae335a65 Force grep to produce colourless output. 2015-03-03 10:52:07 +01:00
Andy Stewart
f6d5b8297f Add note to check grep produces colourless output. 2015-02-27 09:57:34 +00:00
Andy Stewart
061258e044 Add note about solarized-dark. 2015-02-11 10:04:27 +01:00
Andy Stewart
e5efbaffc0 Fix Markdown typo. 2015-01-15 15:00:15 +01:00
Andy Stewart
6b8e908cc9 Enable . command to work with staging/reverting hunks. 2015-01-14 10:40:43 +01:00
Andy Stewart
2c8e82ab80 Add another note for Fish users to README. 2015-01-07 16:41:51 +01:00