You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the plugin slows down your Vim too much, you can have it run less
often by setting `g:gitgutter_eager = 0`.
This replaces the former options `g:gitgutter_on_bufenter` and
`g:gitgutter_on_focusgained`.
Copy file name to clipboardExpand all lines: README.mkd
+10-19Lines changed: 10 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -81,8 +81,7 @@ You can customise:
81
81
* Whether or not vim-gitgutter is on initially (defaults to on)
82
82
* Whether or not signs are shown (defaults to yes)
83
83
* Whether or not line highlighting is on initially (defaults to off)
84
-
* Whether or not vim-gitgutter runs on `BufEnter` (defaults to yes)
85
-
* Whether or not vim-gitgutter runs for all visible buffers on `FocusGained` (defaults to yes)
84
+
* Whether or not vim-gitgutter runs eagerly (defaults to yes)
86
85
87
86
Please note that vim-gitgutter won't override any colours or highlights you've set in your colorscheme.
88
87
@@ -171,26 +170,19 @@ Add `let g:gitgutter_enabled = 0` to your `~/.vimrc`.
171
170
Add `let g:gitgutter_highlight_lines = 1` to your `~/.vimrc`.
172
171
173
172
174
-
#### To stop vim-gitgutter running on `BufEnter`
173
+
#### To stop vim-gitgutter running eagerly
175
174
176
-
This is on by default but causes a noticeable lag for some people. To turn it off, add this to your `~/.vimrc`:
177
-
178
-
```
179
-
let g:gitgutter_on_bufenter = 0
180
-
```
181
-
182
-
If you turn it off, vim-gitgutter will instead run every time you read or write a buffer.
175
+
By default the plugin runs every time you read a file, on `BufEnter`, `TabEnter` and `FocusGained`.
183
176
177
+
This can cause a noticeable lag for some people so you can set the plugin to run instead only when you read or write a file.
184
178
185
-
#### To stop vim-gitgutter running for all visible buffers on `FocusGained`
179
+
To turn off eager execution, add this to your `~/.vimrc`:
186
180
187
-
This is on by default but causes a noticeable lag for some people. To turn it off, add this to your `~/.vimrc`:
188
-
189
-
```viml
190
-
let g:gitgutter_all_on_focusgained = 0
181
+
```
182
+
let g:gitgutter_eager = 0
191
183
```
192
184
193
-
Note that this is always off with gVim on Windows due to a Vim/shell bug causing an infinite loop.
185
+
Note that `FocusGained` cannot be used with gVim on Windows due to a Vim/shell bug causing an infinite loop.
194
186
195
187
196
188
### FAQ
@@ -201,11 +193,10 @@ Your colorscheme is configuring the `SignColumn` highlight group weirdly. Pleas
201
193
202
194
> There's a noticeable lag when vim-gitter runs; how can I avoid it?
203
195
204
-
By default vim-gitgutter runs often so the signs are as accurate as possible. However on some systems this causes a noticeable lag. If you would like to trade a little accuracy for speed, add one or both of these to your `~/.vimrc`:
196
+
By default vim-gitgutter runs often so the signs are as accurate as possible. However on some systems this causes a noticeable lag. If you would like to trade a little accuracy for speed, add this to your `~/.vimrc`:
205
197
206
198
```viml
207
-
let g:gitgutter_on_bufenter = 0
208
-
let g:gitgutter_all_on_focusgained = 0
199
+
let g:gitgutter_eager = 0
209
200
```
210
201
211
202
> Why is no sign shown if I delete the first line(s) in a file?
0 commit comments