.vim/autoload/tig.vim

changeset 828
81ede7493890
equal deleted inserted replaced
827:02630cc4d64a 828:81ede7493890
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