aboutsummaryrefslogtreecommitdiff
path: root/plugin/signify.vim
blob: e60cba570c9d6c91d38bed2bf77a7bb1333360ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
augroup SIGNIFY
  " displays file changes in sign column

  let @l = ":let g:signify_vcs_cmds={'git': 'git diff --no-color --no-ext-diff -U0 HEAD^ -- %f'}|:SignifyRefresh"

  " use signify only with git (improves speed when loading buffers, see :h signify) 
  let g:signify_vcs_list               = [ 'git' ]

  let g:signify_cursorhold_insert      = 0
  let g:signify_cursorhold_normal      = 0
  let g:signify_update_on_bufenter     = 0
  let g:signify_update_on_focusgained  = 0
  let g:signify_sign_show_count        = 0

  if has("multi_byte") && (&enc == 'utf-8' || &enc == 'utf-16' || &enc == 'ucs-4')
    let g:signify_sign_add               = '⊕'
    let g:signify_sign_delete            = '⊖'
    let g:signify_sign_delete_first_line = '⊖'
    let g:signify_sign_change            = '⊗'
    let g:signify_sign_changedelete      = '⊗'
  endif

  function! SignifyColorScheme()
    highlight! SignifySignAdd  ctermbg=NONE
    highlight! link            SignifySignAdd              SignColumn
    highlight! link            SignifySignChange           SignColumn
    highlight! link            SignifySignDelete           SignColumn
    highlight! link            SignifySignChangeDelete     SignColumn
    highlight! link            SignifySignDeleteFirstLine  SignColumn
  endfunction

  packadd vim-signify

  autocmd VimEnter,ColorScheme * call SignifyColorScheme()
augroup END
..