Re: Using vimdiff for merging with Unison File Synchronizer

236 views
Skip to first unread message

Ben Fritz

unread,
Feb 19, 2013, 3:27:24 PM2/19/13
to vim...@googlegroups.com
On Tuesday, February 19, 2013 7:08:21 AM UTC-6, erwin.g...@gmail.com wrote:
> Hi
>
> The File Synchronizer Unison has the possibility to merge two versions of a file both of which have been changed. Unison is perfect for use in a shell, so using it with vim as the merging tool would be perfect, too. The problem is that using a simple
> "vimdiff CURRENT1 CURRENT2"
> just does not start vim. The two best links regarding this are the following:
>
> http://trembits.blogspot.co.at/2010/02/merging-unison-conflict-with-vim.html
> http://hash-bang.net/2009/08/ia-merging-unison/
>
> Their solutions are workarounds, one starts a screen-Session, the other uses gvimdiff. But it would be better to have it working directly in the terminal session.
> So my question is, does anybody know what kind of problem this is?
> I've tried some options like -debug or -V, but there is no possibility to get more information out of it.

Maybe vimdiff is an alias which is not being used, or a script not on the path, or something like that?

Try vim -d CURRENT1 CURRENT2 to launch Vim in diff mode a different way.

erwin.g...@gmail.com

unread,
Feb 20, 2013, 3:24:10 AM2/20/13
to vim...@googlegroups.com
Thank you Ben

This is not the problem, I am using vimdiff 100 times a day and I tried vim with -d, -D, -T "ansi", -V. Using "xterm -e vimdiff ..." works, but opens a new xterm, which I think is not optimal. (also see the links I provided)

Maybe vim does not recognize that it already has a terminal for output, but I really have no clue!

Ben Fritz

unread,
Feb 20, 2013, 10:48:00 AM2/20/13
to vim...@googlegroups.com

All the tools I see which actually worked in those links you provided were GUI apps (including GVIM) or a brand new invocation of a terminal. Unison doesn't need a GUI app for its diff program, does it?

:help -f says that it only affects the GUI Vim, so the problem isn't forking. I wonder if Vim is having trouble detecting the right terminal? It looks like you tried -T "ansi", do you know this to be correct?

I almost never use Vim in a terminal, I almost always use gvim even on Linux, so I'm not going to be much further help here, sad to say.

Reply all
Reply to author
Forward
0 new messages