Tuesday, June 10, 2014

Re: vimdiff noob question

On Tuesday, June 10, 2014 5:58:18 AM UTC-6, Ben Fritz wrote:
> 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.

Thank you for all the suggestion Ben, I tried all of them.
Both gvim diff and vim diff causes a.txt and b.txt to become empty:
C:\Users\wolf\My Documents>vim -d a.txt b.txt
C:\Users\wolf\My Documents>gvim -d a.txt b.txt
Same with --noplugin option:
C:\Users\wolf\My Documents>vim --noplugin -d a.txt b.txt
C:\Users\wolf\My Documents>gvim --noplugin -d a.txt b.txt
There was no error message about a swap file existing already.

where vim is running from:
C:\>where vim
C:\Program Files (x86)\Vim\vim74\vim.exe

VIM - Vi IMproved splash page says "version 7.4.256"

version from in within C:\>"Program Files (x86)\Vim\vim74\vim.exe"
:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Apr 11 2014 15:27:34)
MS-Windows 32-bit console version
Included patches: 1-256
Compiled by digitectNO@SPAMdancingpaper.com:http://SteveHallArchitecture.com
Huge version without GUI. Features included (+) or not (-):
+acl +eval +mouse +syntax
+arabic +ex_extra -mouseshape +tag_binary
+autocmd +extra_search +multi_byte_ime/dyn +tag_old_static
-balloon_eval +farsi +multi_lang -tag_any_white
-browse +file_in_path -mzscheme -tcl
++builtin_terms +find_in_path -netbeans_intg -tgetent
+byte_offset +float +path_extra -termresponse
+cindent +folding +perl/dyn +textobjects
+clientserver -footer +persistent_undo +title
+clipboard +gettext/dyn -postscript -toolbar
+cmdline_compl -hangul_input +printer +user_commands
+cmdline_hist +iconv/dyn +profile +vertsplit
+cmdline_info +insert_expand +python/dyn +virtualedit
+comments +jumplist +python3/dyn +visual
+conceal +keymap +quickfix +visualextra
+cryptv +langmap +reltime +viminfo
+cscope +libcall +rightleft +vreplace
+cursorbind +linebreak +ruby/dyn +wildignore
+cursorshape +lispindent +scrollbind +wildmenu
+dialog_con +listcmds +signs +windows
+diff +localmap +smartindent +writebackup
+digraphs +lua/dyn -sniff -xfontset
-dnd +menu +startuptime -xim
-ebcdic +mksession +statusline -xterm_save
+emacs_tags +modify_fname -sun_workshop -xpm_w32
system vimrc file: "$VIM\vimrc"
user vimrc file: "$HOME\_vimrc"
2nd user vimrc file: "$HOME\vimfiles\vimrc"
3rd user vimrc file: "$VIM\_vimrc"
user exrc file: "$HOME\_exrc"
2nd user exrc file: "$VIM\_exrc"
Compilation: i686-pc-mingw32-gcc -O3 -fomit-frame-pointer -freg-struct-return -f
no-strength-reduce -DWIN32 -DHAVE_PATHDEF -DFEAT_HUGE -DWINVER=0x0500 -D_WIN32_W
INNT=0x0500 -DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL="perl518.dll" -DFEAT_P
YTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL="python27.dll" -DFEAT_PYTHON3 -DDYNA
MIC_PYTHON3 -DDYNAMIC_PYTHON3_DLL="python33.dll" -DFEAT_RUBY -DDYNAMIC_RUBY -DDY
NAMIC_RUBY_DLL="msvcrt-ruby191.dll" -DDYNAMIC_RUBY_VER=191 -DFEAT_LUA -DDYNAMIC_
LUA -DDYNAMIC_LUA_DLL="lua51.dll" -DDYNAMIC_GETTEXT -DDYNAMIC_ICONV -DFEAT_MBYTE
-DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W3
2 -DFEAT_CLIPBOARD -DFEAT_OLE -march=i386 -Iproto -I/cygdrive/c/strawberry/perl/
lib/CORE -I/cygdrive/c/Ruby193/lib/ruby/1.9.1/i386-mingw32 -I/cygdrive/c/Ruby193
/include/ruby-1.9.1 -I/cygdrive/c/Ruby193/include/ruby-1.9.1/i386-mingw32 -I/cyg
drive/c/PROGRA~2/Lua/5.1/include -s
Linking: i686-pc-mingw32-gcc -s -o gvim.exe -luuid -lole32 -lwsock32 -mwindows
-lcomctl32 -lversion -loleaut32 -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic

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