I google'd this multiple times in the past but I've never found an answer. Is there a way to save vimdiff's output (preferably while maintaining colors, highlights, etc.)? I'd like to send this one output file to other people and tell them "just open this file, here are the differences, side by side and highlighted".
If there are better alternatives to vimdiff for this purpose, I'm open to suggestions - something that would work on both Windows and Linux platforms is ideal.
Open a terminal and run this command: vimdiff file1. txt file2. txt -c TOhtml -c 'w!
DESCRIPTION. Vimdiff starts Vim on two (or three) files. Each file gets its own window. The differences between the files are highlighted. This is a nice way to inspect changes and to move changes from one version to another version of the same file.
Vim can export to HTML, see:
:help :TOhtml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With