Commit Graph

85 Commits

Author SHA1 Message Date
Andy Stewart
357306f443 DRY configuration. 2013-03-20 09:42:08 +01:00
Andy Stewart
e04d719159 Customisable signs' symbols. 2013-03-20 09:29:00 +01:00
Andy Stewart
2a5ae179fc Speed up work done on FocusGained.
When vim-gitgutter is configured to update on `BufEnter`, which is the
default, we only need to update visible buffers on `FocusGained`.
Other buffers will be updated as and when the user enters them.
2013-03-19 20:08:54 +01:00
Andy Stewart
fd7fb6cd15 Fix bug where GitGutter wasn't called on buffer write.
This affected people with the default configuration but not those where
`BufEnter` was turned off.

This problem was introduced by the last commit.
2013-03-19 09:12:21 +01:00
Andy Stewart
7f1c104f9f Fix autocommands so GitGutter doesn't run twice on file read. 2013-03-18 16:09:40 +01:00
Andy Stewart
21a27e05b2 Fix typos. 2013-03-15 11:05:25 +01:00
Andy Stewart
966a432ce5 Specify viml for relevant code blocks. 2013-03-15 11:03:24 +01:00
Andy Stewart
c53f4cf807 Add FAQ about lag. 2013-03-15 11:02:45 +01:00
Andy Stewart
677dac451d Add opt-out configuration for BufEnter and FocusGained. 2013-03-15 10:53:31 +01:00
Andy Stewart
04be163a3e Fix bug for GitGutterEnable. 2013-03-15 10:20:43 +01:00
Andy Stewart
d40fd44904 Fix bug when calling GitGutterDisable immediately.
When opening Vim without editing any file, calling GitGutterDisable
would fail because `s:file` was undefined at that point.  The fix breaks
what encapsulation there is, but has the virtue of working.
2013-03-15 10:18:30 +01:00
Andy Stewart
f52625be83 Fix bug where vim-gitgutter tried to run for non-files. 2013-03-15 10:00:09 +01:00
Andy Stewart
c0d24ffa47 Add debugging section to README. 2013-03-14 16:31:55 +01:00
Andy Stewart
c48829586e Update signs across all buffers on FocusGained. 2013-03-14 15:41:45 +01:00
Andy Stewart
3f107f97da Make always-showing-the-sign-column opt-in.
This is consistent with Vim's default behaviour.
2013-03-14 09:34:25 +01:00
Andy Stewart
15ee31acf4 Handle non-English locales. 2013-03-13 14:55:22 +01:00
Andy Stewart
fe2b4ec869 Place a dummy sign to keep sign column.
The sign column automatically appears when there is at least one sign
and disappears when there are none.  There's a small gap between
when vim-gitgutter removes its signs and adds new ones; during that gap
the sign column can flicker.

By adding a dummy sign before removing the real signs, we force the sign
column to remain.
2013-03-13 11:30:24 +01:00
Andy Stewart
1f91ef2402 Document required support for signs in Vim. 2013-03-13 09:54:11 +01:00
Andy Stewart
15b2fb49c9 Document count support for jumping between hunks. 2013-03-13 09:38:26 +01:00
Nick Andryshak
1f04008485 Improve fix to Windows gVim infinite shell loop. 2013-03-12 16:25:18 +01:00
Lewis Franklin
a09e085b51 Prevent infinite loop on Windows gVim. 2013-03-12 16:19:50 +01:00
Andy Stewart
6889f9918e Remove accidentally-committed maps. 2013-03-12 16:03:37 +01:00
Andy Stewart
64e9fac7df Enable prev/next hunk commands to take a count. 2013-03-12 15:57:57 +01:00
Andy Stewart
3f9cf5a44d Document special case of deleted first line(s). 2013-03-08 13:29:38 +01:00
Andy Stewart
3979c4f7b6 Easier customisation. 2013-03-08 13:19:25 +01:00
Andy Stewart
861e417886 Construct variable on one line for clarity. 2013-03-08 12:48:48 +01:00
Andy Stewart
a61ddf453c Extract method for clarity. 2013-03-08 11:45:13 +01:00
Andy Stewart
cf2db0df65 Define sign column highlights. Add colours and signs section. 2013-03-08 11:36:44 +01:00
Vaz Allen
7186f8bcad Highlighting customisation tweaks.
Highlight groups for signs:

- renamed highlight groups with `GitGutter` prefix, and following the
  naming style of the builtin groups `DiffAdd`, `DiffChange`, etc.

- using `highlight default link` to set default colours for signs.
  e.g. the plugin defines `GitGutterAddDefault` as green, and default
  (if `g:gitgutter_highlights`) links `GitGutterAdd` to it (which the
  user can customise).

Highlight groups for lines:

- added gitgutter-specific highlight groups for line highlighting
  (`GitGutterAddLine`, etc) so that this highlighting can be customised
  independent of `DiffAdd` et al (which these default link to).

- line highlighting toggling now only changes the linehl attribute.

  The `linehl` attribute is toggled in `s:update_line_highlights`,
  which separates concerns more clearly.  I'm thinking ahead to the
  possibility of the sign text being configurable, and thinking it will
  be DRYer to keep these things separate.  Maybe it's just aesthetic
  though.

Bonus: resolved "eugh" ;)
2013-03-08 11:14:56 +01:00
Andy Stewart
14563c3689 Ensure signs feature is present. 2013-03-07 20:00:58 +01:00
Bill Turner
b9fbcfb330 Add help documentation. 2013-03-07 15:08:55 +01:00
Andy Stewart
92fd153d76 Add link to Mercurial fork. 2013-03-07 11:37:02 +01:00
Andy Stewart
dbfbbb4697 Add a related plugin. 2013-03-06 14:55:10 +01:00
Andy Stewart
b6c5364436 Run GitGutter when focus is gained.
This updates the signs on the current file when you return to GUI vim.
For example, you make some changes in Vim, tab to your shell and commit
them, then tab back to Vim; at this point you want the signs to update
automatically for you.
2013-03-06 14:08:44 +01:00
Andy Stewart
177365691b Change public function names to match command names. 2013-03-06 13:55:19 +01:00
Tom Cammann
a67904e812 Change command names to follow GitGutterXxxx. 2013-03-06 13:51:59 +01:00
Andy Stewart
20f37f5fa9 Add another alternative. 2013-03-06 12:16:04 +01:00
Andy Stewart
00a862285f Work with all shells, not just bash. 2013-03-06 12:11:38 +01:00
Drew Stokes
fd22bbbb08 Disable diff colors to fix file name grep. 2013-03-06 11:17:38 +01:00
shawn-sterling
68c12c946c Add Vundle instructions. 2013-03-06 11:04:12 +01:00
Andy Stewart
d543e0dddc Fix typo. 2013-03-06 10:56:00 +01:00
Andy Stewart
cb5e6e712a Add more alternatives. 2013-03-06 10:55:04 +01:00
Marcin Kulik
32ac7562cd Mention vim-git-inline-diff in README 2013-03-05 23:45:16 +01:00
Andy Stewart
24efce03cc Add comment about defining highlights. 2013-03-05 14:51:55 +01:00
Konstantin Kudryashov
34879ec3c8 Add ability to disable highlights registration
So we could tune up it in our custom colorschemes
2013-03-05 13:54:00 +01:00
Andy Stewart
c46cf29392 Extract methods for clarity. 2013-03-05 10:10:14 +01:00
Andy Stewart
9924c7ca1d Handle modifed-and-added/removed diffs. 2013-03-05 10:00:06 +01:00
Andy Stewart
518266d8c5 Fix typo. 2013-03-05 09:33:52 +01:00
Marco Hinz
e7dd1e0341 Escape ' characters in filepaths. 2013-03-04 12:40:20 +01:00
Andy Stewart
1ab2f4dfcc Expose hunks.
Make hunks available to any other plugins which might want to use them.
2013-03-01 09:21:02 +01:00