[Reproducible-builds] Bug#833370: diffoscope: vim folding for text output

Daniel Shahaf danielsh at apache.org
Wed Aug 3 15:04:39 UTC 2016


Package: diffoscope
Version: 56
Severity: minor
Tags: upstream patch

Dear Maintainer,

The following provides Vim folding for diffoscope text output:

[[[
function! Diffoscope_txt_foldexpr(lnum)
	let offset = stridx(getline(a:lnum), '├── ')
	if offset >= 0
		return '>' . (1+offset/6)
	else
		return '='
	endif
endfun
set foldmethod=expr foldexpr=Diffoscope_txt_foldexpr(v:lnum)
]]]

Please consider adding this to the documentation.  A better would be to
wrap this as a proper ftplugin or plugin, if somebody steps up to figure
out and write the needed glue code.

Cheers,

Daniel



More information about the Reproducible-builds mailing list