Wednesday, June 11, 2014

Re: vimdiff noob question

On Tuesday, June 10, 2014 4:49:26 PM UTC-5, wolfv wrote:
>
> I manually set a.txt and b.txt to contain unique lines of text.

In what program? Vim? Notepad?

> Then from Command Prompt:
> gvim -O a.txt b.txt
> opens gvim showing both files as empty.

This tells me that Vim is somehow not finding the files, or maybe can't get access to the files.

> Looking at Windows Explorer preview pane confirms that both files are indeed empty.

...and yet somehow Vim saves over them anyway.

> Then from inside gvim:
> :windo diffthis
> A window flashes (opens and closes very fast), but it's too fast for me to see what it is.
>

That would be the shell window, running "diff.exe" to get the output. But at this point your files were already hosed, so we have ruled out diff as the cause. Somehow Vim by itself is eating your data.

> I manually reset a.txt and b.txt to contain unique lines of text.
> Then from Command Prompt:
> gvim -o a.txt b.txt
> opens gvim showing both files as empty.
> But looking at Windows Explorer preview pane, I can see that a.txt is empty and b.txt still contains the original text.
> Then from Command Prompt:
> vim -o a.txt b.txt
> an error message pops up:
> C:\PROGRA~2\Vim\vim74\vim.exe is not a valid Win32 application.
> [OK]
> I click the "OK" button and the Command Prompt line says:
> Access is denied.
>

That looks like maybe some sort of 64-bit vs. 32-bit conflict. I'm not sure what's going on there. I'd just use gvim if I were you unless you really really like working in the cmd.exe shell.

> I think we are on to something. What does it mean?
> Screen shot of Command Prompt is attached.

I suggest dropping vimdiff for now and finding out why Vim is eating your files.

Start Vim this way, with text in both files:

gvim -N -u NONE -U NONE -i NONE -O a.txt b.txt

What happens? Does Vim open the files properly? If so, there is some problem with your config. If not, I'm really not sure what could be going on. If Vim still eats your files, I'd recommend a full uninstall and reinstall of Vim as a first step.

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