views:

658

answers:

2
+1  Q: 

vimdiff and MacVim

I'd like to run vimdiff on MacVim. Is there an easy way I'd be able to do it?

+3  A: 
  • From the terminal

If you have the mvim script installed (it is in the dmg, just put it somewhere in your PATH), you can just type in a shell:

mvim -d file1 file2

You can alias this to mvimdiff if you like.

  • From within macvim

In macvim, like in vim , you can also use:

:e file1
:diffsplit file2
or
:vert diffsplit file2

The second option gives you a vertical diff, which is usually more readable

LeMiz
Aha! Thanks for the in-vim tip. It seems like there is always something new to learn in vim :D
Antonio
You are welcome! :help diff is your friend.
LeMiz
+2  A: 

If you symlink gvimdiff to mvim then mvim will start with -d etc. Vim and Mvim both look at what executable name they've been started with to determine how they behave. That how gvim and vim can be both the same executable on linux and it's the same on OSX.

Benj
Great info to know. Thanks!
Antonio