Tuesday, June 10, 2014

Re: vimdiff noob question

On Monday, June 9, 2014 3:42:08 PM UTC-5, wolfv wrote:
>
> Here is a detailed play-by-play of me opening files in vim (screen shots are attached):

Thanks!

>
> I open files a.txt and b.txt in vim (non-diff mode).

Ok, it looks like this was using gvim. E.g., from the command-line, "gvim -o a.txt b.txt" gives me the same setup.

> Then I enter this in Command Prompt:
> vim -d a.txt b.txt
> Upon hitting enter, a warning pops up:
> W11: Warning: File "a.txt" has changed since editing started
> See ":help W11" for more info.
> [OK] [Load File]
> I click the "Load File" button, and file a.txt is empty in the vim non-diff mode.
> Similar for file b.txt.

Since you said you clicked a button it sounds like you got this message in your gvim window, not your vim window.

What *should* have happened, is that your new Vim instance started within your terminal for diff mode, should have give you an error message about a swap file existing already, asking if you want to delete the swap file, open the file read-only, edit the file anyway, etc.

Since this did not happen, I wonder, what is running when you run "vim" from the command-line. On recent Windows, you can do "where vim" to find that out (similar to "which vim" in Unix). Also the :version command within that Vim could help.

On my system, the Cream installer for some reason created a "gvim.bat" and a couple others, but not "vim.bat". I had to launch "vim -d" with the absolute path to vim.exe.

> The files are also empty in vimdiff.
>

When I follow all the same steps so far, I get the "swap exists" error message I describe in my vim diff, and if I answer "readonly" or "edit anyway" I get a diff window with file contents unchanged. File contents in gvim are also unchanged.

> I tried to disable all plugins with the --no-plugin switch when launching Vim, but a Message said:
> VIM - ViIMproved 7.4 (2013 Aug 10, compiled Apr 11 2014 15:25:28)
> Unknown option argument: "--no-plugin"
> More into with: "vim -h"
> How to disable all plugins except vimdiff?
> The _vimrc is the default file that installed with vim (attached).

Disabling all plugins is done using "--noplugin" rather than "--no-plugin". I do that sometimes too :-)

Also try "gvim -d" rather than "vim -d" to see if that helps.

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

Post a Comment