You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Or try this modification of DiffFold that lists each diff as a separate folded line:
function! DiffFold(lnum)
" Fold a diff output as title and hunks underneath it. A big patch should
" collapse to a bunch of diff commands with only
let line = getline(a:lnum)
if line =~ '^diff '
" Command as title
return '>1'
elseif line =~ '^\(---\|+++\|@@\) '
" Diff blocks/hunks as subtitle
return '>2'
elseif line[0] =~ '[-+ ]'
" Diff line is fold content
return 2
else
" Add/delete files, index, etc are expanded with diff
return 1
endif
endfunction
You could setup a ~/.vim/after/ftplugin/diff.vim to setlocal foldlevel=0 so you always start diffs folded.
enhance request,
it will be nice if could add a divider line between files for a commit.
thanks
The text was updated successfully, but these errors were encountered: