forked from martinvonz/jj
-
Notifications
You must be signed in to change notification settings - Fork 0
vimtabdiff script adapted
Ilya Grigoriev edited this page Feb 28, 2023
·
1 revision
vim -c '
function! JJaddtotab()
let l:buf = bufnr(\'%\')
if g:jj_old
tab split
tabmove
else
tablast
belowright vsplit
endif
exe \'b \' . l:buf
diffthis
normal gg
let g:jj_old = !g:jj_old
tabfirst
endfunction
" @a:000 [{file}] List of files to be diffed, interleaved old/new.
function! JJtabdiff(...)
let g:tabdiff_active = 1
let g:jj_old = 1
argdo call JJaddtotab()
tabclose
endfunction
' -c 'silent :call JJtabdiff()' aa bb cc dd