From f03a1a1f021ae1f4d04b6a2dc533f3329a5fe7a4 Mon Sep 17 00:00:00 2001 From: Andy Stewart Date: Fri, 6 May 2016 16:32:29 +0100 Subject: [PATCH] Document the autocmd. --- doc/gitgutter.txt | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/doc/gitgutter.txt b/doc/gitgutter.txt index f7c18f8..6c382d5 100644 --- a/doc/gitgutter.txt +++ b/doc/gitgutter.txt @@ -14,7 +14,8 @@ CONTENTS *GitGutterContents* 2. Installation ................. |GitGutterInstallation| 3. Usage ........................ |GitGutterUsage| 4. Commands ..................... |GitGutterCommands| - 5. CUSTOMISATION................. |GitGutterCustomisation| + 5. Autocommand .................. |GitGutterAutocmd| + 6. CUSTOMISATION................. |GitGutterCustomisation| 6. FAQ .......................... |GitGutterFAQ| =============================================================================== @@ -110,7 +111,16 @@ Commands for staging or undoing individual hunks: Preview the hunk the cursor is in. =============================================================================== -5. CUSTOMISATION *GitGutterCustomisation* +5. AUTOCOMMAND *GitGutterAutocmd* + +After updating a buffer's signs vim-gitgutter fires a |User| |autocmd| with the +event GitGutter. You can listen for this event, for example: +> + autocmd User GitGutter call updateMyStatusLine() +< + +=============================================================================== +6. CUSTOMISATION *GitGutterCustomisation* You can customise: @@ -286,7 +296,7 @@ let g:gitgutter_async = 0 < =============================================================================== -6. FAQ *GitGutterFAQ* +7. FAQ *GitGutterFAQ* a. Why are the colours in the sign column weird?