Tuesday, August 19, 2014

Re: compare and export results to textfile => # vim -d a b > c

On Tuesday, August 19, 2014 1:56:41 AM UTC-5, Steven Barens wrote:
> Hi there,
>
> I love using -d option comparing two files.
>
>
> # vim -d a b
>
> Result:
> Line 1 Hello | Line 1 Bello <- highlight
> Line 2 House | Line 2 House
> Line 3 Mouse | Line 3 House <- highlight
>
>
> Now I'd like export exactly this result to textfile seperated by | (pipe).
>
>
> Would be great but that doesn't work:
> # vim -d a b > c
> Vim: Warning: Output is not to a terminal
>
>
> Need help ;)
>
> Best wishes

How would you get colors in the text file?

The official runtime plugins offer a :TOhtml command which will create an HTML document with the diff, including colors. There are options to mimic Vim's folding, etc. as well. See :help :TOhtml.

There is also a plugin that offers the same features and more, and also outputs to more formats: http://www.vim.org/scripts/script.php?script_id=3113

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: