.config/nvim/autoload/tig.vim

changeset 1025
9dfc1a5a52dc
parent 1024
edacbb66fc8f
child 1026
b70ed2db4354
equal deleted inserted replaced
1024:edacbb66fc8f 1025:9dfc1a5a52dc
1 " Why this wrapper? vim :term sets $TERM to xterm but supports -256color and
2 " all the suggestions for fixing that involve changing $TERM for vim itself
3 " rather than just the subprocess. Also since this runs in place we can
4 " switch back after.
5 func! tig#Tig(...) abort
6 call term_start(
7 \ ['/usr/bin/env', 'TERM=xterm-256color', 'tig'] + a:000,
8 \ {'curwin': 1, 'term_name': join(['!tig'] + a:000, ' '), 'exit_cb': 'tig#TigExit'}
9 \ )
10 endfunc
11
12 func! tig#TigBlame() abort
13 call tig#Tig('blame', '+' . line('.'), '--', expand('%'))
14 endfunc
15
16 func! tig#TigExit(...) abort
17 buffer #
18 endfunc

mercurial