#833370 diffoscope: vim folding for text output

#833370#5
Date:
2016-08-03 15:04:39 UTC
From:
To:
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

#833370#10
Date:
2016-08-15 10:26:42 UTC
From:
To:
tags 833370 - patch
thanks

Hi Daniel,

Indeed.

Without that, we can't really classify this bug as having a patch
though, so dropping that tag for now. :)


Regards,

#833370#17
Date:
2016-08-16 22:47:16 UTC
From:
To:
Chris Lamb wrote on Mon, Aug 15, 2016 at 11:26:42 +0100:

Holger suggested on IRC that "the needed glue code" would be integration
with vim-addon-manager.

I believe  :help new-filetype  is the relevant upstream help topic.

Cheers,

Daniel

#833370#24
Date:
2018-12-15 15:02:26 UTC
From:
To:
forwarded 833370 https://salsa.debian.org/reproducible-builds/diffoscope/issues/15
thanks

I've forwarded this upstream here:

https://salsa.debian.org/reproducible-builds/diffoscope/issues/15


Regards,