parent
4c3c10d1cb
commit
de297820bc
@ -41,3 +41,10 @@ function! sy#util#run_in_dir(dir, cmd) abort
|
|||||||
|
|
||||||
return ret
|
return ret
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
" Function: #refresh_windows {{{1
|
||||||
|
function! sy#util#refresh_windows() abort
|
||||||
|
let winnr = winnr()
|
||||||
|
windo if exists('b:sy') | call sy#start() | endif
|
||||||
|
execute winnr .'wincmd w'
|
||||||
|
endfunction
|
||||||
|
@ -33,6 +33,7 @@ TOC *signify-contents*
|
|||||||
OPTIONS ........................ |signify-options|
|
OPTIONS ........................ |signify-options|
|
||||||
COMMANDS ....................... |signify-commands|
|
COMMANDS ....................... |signify-commands|
|
||||||
MAPPINGS ....................... |signify-mappings|
|
MAPPINGS ....................... |signify-mappings|
|
||||||
|
FUNCTIONS ...................... |signify-functions|
|
||||||
OBJECTS ........................ |signify-objects|
|
OBJECTS ........................ |signify-objects|
|
||||||
COLORS ......................... |signify-colors|
|
COLORS ......................... |signify-colors|
|
||||||
|
|
||||||
@ -96,7 +97,7 @@ All available options:~
|
|||||||
|g:signify_skip_filetype|
|
|g:signify_skip_filetype|
|
||||||
|g:signify_skip_filename|
|
|g:signify_skip_filename|
|
||||||
|g:signify_update_on_bufenter|
|
|g:signify_update_on_bufenter|
|
||||||
|g:signify_update_on_focus|
|
|g:signify_update_on_focusgained|
|
||||||
|g:signify_line_highlight|
|
|g:signify_line_highlight|
|
||||||
|g:signify_sign_add|
|
|g:signify_sign_add|
|
||||||
|g:signify_sign_delete|
|
|g:signify_sign_delete|
|
||||||
@ -209,11 +210,11 @@ Update signs when entering a buffer that was modified.
|
|||||||
NOTE: This also saves the buffer to disk!
|
NOTE: This also saves the buffer to disk!
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*g:signify_update_on_focus*
|
*g:signify_update_on_focusgained*
|
||||||
>
|
>
|
||||||
let g:signify_update_on_focus = 0
|
let g:signify_update_on_focusgained = 0
|
||||||
<
|
<
|
||||||
Update signs when Vim gains/loses focus.
|
Update signs when Vim gains focus.
|
||||||
|
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
*g:signify_line_highlight*
|
*g:signify_line_highlight*
|
||||||
@ -307,6 +308,19 @@ Default mapping: <leader>gt
|
|||||||
Toggle line highlighting for lines containing changes.
|
Toggle line highlighting for lines containing changes.
|
||||||
Default mapping: <leader>gh
|
Default mapping: <leader>gh
|
||||||
|
|
||||||
|
==============================================================================
|
||||||
|
FUNCTIONS *signify-functions*
|
||||||
|
|
||||||
|
Signify exposes some functions which you can use to customize its behavior.
|
||||||
|
|
||||||
|
------------------------------------------------------------------------------
|
||||||
|
*signify-#refresh_windows()*
|
||||||
|
|
||||||
|
This function updates signs for all windows. For example, to update signs when
|
||||||
|
Vim loses focus, you use:
|
||||||
|
>
|
||||||
|
autocmd FocusLost * call sy#util#refresh_windows()
|
||||||
|
<
|
||||||
==============================================================================
|
==============================================================================
|
||||||
OBJECTS *signify-objects*
|
OBJECTS *signify-objects*
|
||||||
|
|
||||||
|
@ -30,8 +30,8 @@ augroup signify
|
|||||||
autocmd CursorHoldI * nested call s:save()
|
autocmd CursorHoldI * nested call s:save()
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if get(g:, 'signify_update_on_focus') && !has('gui_win32')
|
if get(g:, 'signify_update_on_focusgained') && !has('gui_win32')
|
||||||
autocmd FocusGained,FocusLost * call s:refresh_windows()
|
autocmd FocusGained * call sy#util#refresh_windows()
|
||||||
endif
|
endif
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
@ -102,13 +102,6 @@ function! s:save()
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Function: refresh_windows {{{1
|
|
||||||
function! s:refresh_windows() abort
|
|
||||||
let winnr = winnr()
|
|
||||||
windo if exists('b:sy') | call sy#start() | endif
|
|
||||||
execute winnr .'wincmd w'
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
" Function: hunk_text_object {{{1
|
" Function: hunk_text_object {{{1
|
||||||
function! s:hunk_text_object(emptylines) abort
|
function! s:hunk_text_object(emptylines) abort
|
||||||
if !exists('b:sy')
|
if !exists('b:sy')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user