Replace vim-gitgutter with vim-signify
vim-gitgutter is buggy. vim-signify might be better, it does allow configuration of which events trigger a sign column update and this patch takes advantage of that. Firstly, the `CursorHold` and `CursorHoldI` events are disabled and replaced with `InsertLeave` and `TextChanged` events. This makes the sign column updates immediate, and since vim-signify is asynchronous it's faster too.
This commit is contained in:
@@ -69,7 +69,7 @@ function! do#rename_include_guard(old)
|
||||
call setpos('.', l:pos)
|
||||
endfunction
|
||||
|
||||
" Setup and start a debugging command.
|
||||
" Setup and start a debugging command
|
||||
function! do#debug(...)
|
||||
packadd termdebug
|
||||
let l:command = 'TermdebugCommand'
|
||||
@@ -86,3 +86,13 @@ function! do#last_change()
|
||||
norm!``
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" Augment vim-signify update events
|
||||
function! do#signify() abort
|
||||
" Disable update on cursor hold
|
||||
autocmd! signify CursorHold,CursorHoldI
|
||||
" Enable updates on leaving insert mode
|
||||
autocmd signify InsertLeave,TextChanged <buffer> call sy#start()
|
||||
" Enable update on text change e.g. undo/redo
|
||||
autocmd signify TextChanged <buffer> call sy#start()
|
||||
endfunction
|
||||
|
||||
Reference in New Issue
Block a user