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
2009-10-28 08:48:17
Aha! Thanks for the in-vim tip. It seems like there is always something new to learn in vim :D
Antonio
2009-10-28 13:20:34
You are welcome! :help diff is your friend.
LeMiz
2009-10-28 19:42:48
+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
2009-10-28 12:31:59