Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How are you solving the diff problem? Word based diffs tend to be jumpy and hard to follow. On the other hand line based diffs do not work well for text (prose).


Yeah, prose.io uses word diffs and it's definitely hard to follow.

I'm doing 'fragment diffs' (doesn't really have a name) - but basically, all the text is displayed as you would read it (sentences and paragraphs), with diffs displayed inline and colored. Added content in green, removed content in red - doesn't matter if it's characters/words/sentences/paragraphs - it all works.

Screenshot is not the best, but something like this:

http://www.flickr.com/photos/madebyloren/9620674181/


Don't know if you've already thought of / planned this, but please please implement a side-by-side diff view.

Code is easy enough to read in a unified diff because lines are usually short (unless java). Prose flows a lot more fluidly, and there is no formal grammar for human language. I have had the displeasure of having to read "redlines" (prose with inline diffs marked in red strikeout) and I find them completely impenetrable.


I'm using latex+vim+git for this purpose currently. I put two spaces after a period to signal the end of a sentence in Latex. Which helps me break the document up by sentences with vim.

If you're using markup then encouraging the period-double-space could be a harmless way of easily breaking the document up by sentences


"Sentence-based" diffs would work well for prose, but the problem is recognizing sentences, given the other uses for full stops. If you use hard line breaks at, and only at, sentence ends, you could use line-based diffs to do this (but this may run into editing convenience issues.)


We've been working on a similar problem. Writing in markdown, pre-processing the saved markdown to truncate to 80 column (best fit) paragraphs and then diffing on the markdown.


I think for writing, sentence-based diffs would be the most useful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: