Monday, April 28, 2014

Re: Compare files, save differences

On Mon 21 Apr 2014 at 02:28:20 PDT Christian Brabandt wrote:
>That is what external commands are good for. I would use comm(1)
>
>#v+
>/tmp/compare % comm -23 <(sort allwords.txt) <(sort mywords.txt)

That's probably the best solution if you're on Unix, Linux or OS X.

Not sure if comm(1) is available by default on Windows, however.
It's been a while since I've worked on one of those systems.
I'm pretty sure you can get comm(1) by installing Cygwin, the MKS Toolkit,
or Microsoft's Subsystem for Unix-based Applications (SUA).
But if this is the only Unix-like task the OP needs done,
it might not be worth the trouble.

In general, whenever possible I prefer to use external commands
rather than plugins. If I wanted my editor to do everything itself,
I'd be using emacs. ;)


--
--
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: