Fandom

Vim Tips Wiki

Script:102

1,624pages on
this wiki
Add New Page
Talk0

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

Use this page to discuss script 102 DirDiff

  • Add constructive comments, bug reports, or discuss improvements (see the guideline).
  • Do not document the script here (the author should do that on vim.org).
  • This page may be out of date: check the script's vim.org page above, and its release notes.

Restrictions Edit

Set LC_ALL=C before starting vim, otherwise the diff view for diffing files won't open.

Question Edit

Is there any easy way to set up this vim script to run with a config file or in a script so I can easily compare dir1 vs dir2, and dir3 vs dir4, dir5 vs dir6 without having to type all of them every time. ie I have to make modifications to config files across a system on a dev system, and I want to take those changes to qual and recompare them but they are not just in 1 directory with a single root they are like 6 directories I need to compare, frequently.

Answer Edit

Yes!

#!/bin/sh
[ ! -d "$1" ] && exit 1
[ ! -d "$2" ] && exit 2
LANG=C vimdiff -c "DirDiff \"$1\" \"$2\""

Also on Fandom

Random Wiki