Ad blocker interference detected!
Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers
Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.
created June 24, 2013 · complexity basic · version 7.0
When inspecting large diff/patch files, the following fold function is handy. Put it in your
ftplugin/diff.vim file or equivalent.
setlocal foldmethod=expr foldexpr=DiffFold(v:lnum) function! DiffFold(lnum) let line = getline(a:lnum) if line =~ '^\(diff\|---\|+++\|@@\) ' return 1 elseif line =~ '[-+ ]' return 2 else return 0 endif endfunction
- diff_fold.vim folds changesets, files, and hunks in (Mercurial, and similar) diff output