.config/nvim/autoload/tig.vim

changeset 1022
d509e282ae10
equal deleted inserted replaced
1021:f0756bba5d2f 1022:d509e282ae10
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