Remove g:signify_cursorhold_normal and g:signify_cursorhold_insert
If you want that behaviour, set 'autowrite' instead. References #226.
This commit is contained in:
parent
88cae56c30
commit
8fa3524a13
@ -51,9 +51,9 @@ Supported VCS:~
|
|||||||
==============================================================================
|
==============================================================================
|
||||||
MODUS OPERANDI *signify-modus-operandi*
|
MODUS OPERANDI *signify-modus-operandi*
|
||||||
|
|
||||||
When you open a new buffer, Sy registers it as `active` and tries to figure
|
When you open a new buffer, Sy registers it as `active` and tries to figure out
|
||||||
out whether the underlying file is controlled by a VCS (version control
|
whether the underlying file is controlled by a VCS (version control system) or
|
||||||
system) or not.
|
not.
|
||||||
|
|
||||||
For that, it asynchronously tries all the `diff` subcommands of all the VCS
|
For that, it asynchronously tries all the `diff` subcommands of all the VCS
|
||||||
tools that are supported and executable. It's recommended to set
|
tools that are supported and executable. It's recommended to set
|
||||||
@ -62,9 +62,9 @@ tools that are supported and executable. It's recommended to set
|
|||||||
If one of the checks produces a proper diff, that VCS will automatically be
|
If one of the checks produces a proper diff, that VCS will automatically be
|
||||||
used for all successive calls to Sy.
|
used for all successive calls to Sy.
|
||||||
|
|
||||||
If none of the checks produces a proper diff, the VCS will be set to
|
If none of the checks produces a proper diff, the VCS will be set to `unknown`.
|
||||||
`unknown`. The next time Sy gets run, the buffer will be marked as `inactive`,
|
The next time Sy gets run, the buffer will be marked as `inactive`, so it won't
|
||||||
so it won't look for changes anymore.
|
look for changes anymore.
|
||||||
|
|
||||||
Or you set |g:signify_disable_by_default|, which registers all new buffers as
|
Or you set |g:signify_disable_by_default|, which registers all new buffers as
|
||||||
`inactive`, and enable Sy on demand using |signify-:SignifyToggle|.
|
`inactive`, and enable Sy on demand using |signify-:SignifyToggle|.
|
||||||
@ -73,6 +73,9 @@ By default, Sy is rather conservative and only updates signs when opening a
|
|||||||
new buffer or writing it. If you want more agressive sign updating, have a
|
new buffer or writing it. If you want more agressive sign updating, have a
|
||||||
look at |g:signify_realtime|.
|
look at |g:signify_realtime|.
|
||||||
|
|
||||||
|
Moreover, if you want to update signs after 'updatetime' (using the |CursorHold|
|
||||||
|
and |CursorHoldI| events), set 'autowrite'.
|
||||||
|
|
||||||
Use |signify-:SignifyList| to list all buffers managed by Sy and their current
|
Use |signify-:SignifyList| to list all buffers managed by Sy and their current
|
||||||
state.
|
state.
|
||||||
|
|
||||||
@ -143,8 +146,6 @@ Other options:~
|
|||||||
|g:signify_sign_changedelete|
|
|g:signify_sign_changedelete|
|
||||||
|g:signify_sign_show_count|
|
|g:signify_sign_show_count|
|
||||||
|g:signify_sign_show_text|
|
|g:signify_sign_show_text|
|
||||||
|g:signify_cursorhold_normal|
|
|
||||||
|g:signify_cursorhold_insert|
|
|
||||||
|g:signify_difftool|
|
|g:signify_difftool|
|
||||||
|g:signify_fold_context|
|
|g:signify_fold_context|
|
||||||
|
|
||||||
@ -199,8 +200,6 @@ With this option enabled, signs update on:
|
|||||||
|BufEnter| (opening or switching to another buffer)
|
|BufEnter| (opening or switching to another buffer)
|
||||||
|WinEnter| (opening or switching to another window)
|
|WinEnter| (opening or switching to another window)
|
||||||
|BufWritePost| (saving a buffer)
|
|BufWritePost| (saving a buffer)
|
||||||
|CursorHold| (cursor in normal mode wasn't moved; also saves file)
|
|
||||||
|CursorHoldI| (cursor in insert mode wasn't moved; also saves file)
|
|
||||||
|FocusGained| (OS window containing Vim got focus)
|
|FocusGained| (OS window containing Vim got focus)
|
||||||
|
|
||||||
NOTE: Running Sy on all these events would block too often for older Vim
|
NOTE: Running Sy on all these events would block too often for older Vim
|
||||||
@ -345,18 +344,6 @@ yourself: |signify-colors|.
|
|||||||
|
|
||||||
If you want no sign column at all and use Vim 7.4.2201+, use |'signcolumn'|.
|
If you want no sign column at all and use Vim 7.4.2201+, use |'signcolumn'|.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
|
||||||
*g:signify_cursorhold_normal*
|
|
||||||
*g:signify_cursorhold_insert* >
|
|
||||||
let g:signify_cursorhold_normal = 0
|
|
||||||
let g:signify_cursorhold_insert = 0
|
|
||||||
<
|
|
||||||
Additionally trigger sign updates in normal or insert mode after 'updatetime'
|
|
||||||
miliseconds without any keypresses. This fires only once between keypresses,
|
|
||||||
thus not every 'updatetime' miliseconds.
|
|
||||||
|
|
||||||
NOTE: This also saves the buffer to disk!
|
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*g:signify_difftool* >
|
*g:signify_difftool* >
|
||||||
let g:signify_difftool = 'gnudiff'
|
let g:signify_difftool = 'gnudiff'
|
||||||
@ -610,11 +597,12 @@ EXAMPLE *signify-example*
|
|||||||
An example configuration for Sy:
|
An example configuration for Sy:
|
||||||
>
|
>
|
||||||
let g:signify_vcs_list = [ 'git', 'hg' ]
|
let g:signify_vcs_list = [ 'git', 'hg' ]
|
||||||
let g:signify_cursorhold_insert = 1
|
|
||||||
let g:signify_cursorhold_normal = 1
|
|
||||||
let g:signify_update_on_bufenter = 0
|
let g:signify_update_on_bufenter = 0
|
||||||
let g:signify_update_on_focusgained = 1
|
let g:signify_update_on_focusgained = 1
|
||||||
|
|
||||||
|
" update signs after 'updatetime'
|
||||||
|
set autowrite
|
||||||
|
|
||||||
nnoremap <leader>gt SignifyToggle
|
nnoremap <leader>gt SignifyToggle
|
||||||
nnoremap <leader>gh SignifyToggleHighlight
|
nnoremap <leader>gh SignifyToggleHighlight
|
||||||
nnoremap <leader>gr SignifyRefresh
|
nnoremap <leader>gr SignifyRefresh
|
||||||
|
@ -20,7 +20,8 @@ augroup signify
|
|||||||
autocmd QuickFixCmdPre *vimgrep* let g:signify_locked = 1
|
autocmd QuickFixCmdPre *vimgrep* let g:signify_locked = 1
|
||||||
autocmd QuickFixCmdPost *vimgrep* let g:signify_locked = 0
|
autocmd QuickFixCmdPost *vimgrep* let g:signify_locked = 0
|
||||||
|
|
||||||
autocmd BufWritePost * call sy#start()
|
autocmd BufWritePost * call sy#start()
|
||||||
|
autocmd CursorHold,CursorHoldI * nested if &autowrite | call s:save() | endif
|
||||||
|
|
||||||
if s:realtime
|
if s:realtime
|
||||||
autocmd BufEnter,WinEnter * call sy#start()
|
autocmd BufEnter,WinEnter * call sy#start()
|
||||||
@ -31,12 +32,6 @@ augroup signify
|
|||||||
if get(g:, 'signify_update_on_bufenter')
|
if get(g:, 'signify_update_on_bufenter')
|
||||||
autocmd BufEnter * nested call s:save()
|
autocmd BufEnter * nested call s:save()
|
||||||
endif
|
endif
|
||||||
if s:realtime || get(g:, 'signify_cursorhold_normal')
|
|
||||||
autocmd CursorHold * nested call s:save()
|
|
||||||
endif
|
|
||||||
if s:realtime || get(g:, 'signify_cursorhold_insert')
|
|
||||||
autocmd CursorHoldI * nested call s:save()
|
|
||||||
endif
|
|
||||||
if (s:realtime || get(g:, 'signify_update_on_focusgained')) && !has('gui_win32')
|
if (s:realtime || get(g:, 'signify_update_on_focusgained')) && !has('gui_win32')
|
||||||
autocmd FocusGained * SignifyRefresh
|
autocmd FocusGained * SignifyRefresh
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user