Re: can't diffsplit
I'm having the same problem, and the three solutions don't work for me. In all the three solutions (and even the other thread I started with your reply windo diffthis) doesn't work. What happens is that one window folds the complete file to one line. The other window keeps the file open as it was. Is this normal vim diffthis behaviour? I was expecting somekind of Winmerge behaviour. Rgds, Eric I. To diff one file already being edited with another file not being edited: 1. make the file already being edited current (let's say foo.txt) 2. :vertical diffsplit bar.txt II. To diff two files already being edited: 1. make one file current 2. :diffthis 3. make the other file current 4. :diffthis 5. (Optional) Rearrange the windows (using ^W commands) to place them side-by-side. III. To diff (in an existing Vim, but in new windows) two files not being edited 1. :bot new foo.txt 2. :vert diffsplit bar.txt
Re: can't diffsplit
Eric Leenman wrote: I'm having the same problem, and the three solutions don't work for me. In all the three solutions (and even the other thread I started with your reply windo diffthis) doesn't work. What happens is that one window folds the complete file to one line. The other window keeps the file open as it was. Let's start from scratch. Say you have two files, old.txt and new.txt, where they are similar but different. You run: gvim -d old.txt new.txt You should see the two files side-by-side. Groups of lines that are identical are folded. Differences are highlighted. Each vertical split has a fold column (grey by default) down the left side. Does the above work? When you follow Tony's advice, do you see the same fold column in each split? If not, you need to switch to the split missing the fold column and type ':diffthis'. I was expecting somekind of Winmerge behaviour. Winmerge can do some great stuff, but Vim differencing of two file is better because Vim folds lines that are the same. John
Re: can't diffsplit
Lev Lvovsky wrote: I have two files which I'd like to compare via diffsplit in an existing vim session - trying to do so by issuing ':diffsplit filename' when the other one is already in the window gets me the error: E97: Cannot create diffs I can properly open the diff in a separate instance via 'vimdiff', as well as ':diffsplit' - is there something wrong with my existing session? thanks! -lev I. To diff one file already being edited with another file not being edited: 1. make the file already being edited current (let's say foo.txt) 2. :vertical diffsplit bar.txt II. To diff two files already being edited: 1. make one file current 2. :diffthis 3. make the other file current 4. :diffthis 5. (Optional) Rearrange the windows (using ^W commands) to place them side-by-side. III. To diff (in an existing Vim, but in new windows) two files not being edited 1. :bot new foo.txt 2. :vert diffsplit bar.txt Best regards, Tony. -- A KNIGHT rides into shot and hacks him to the ground. He rides off. We stay for a moment on the glade. A MIDDLE-AGED LADY in a C. A. twin-set emerges from the trees and looks in horror at the body of her HUSBAND. MRS HISTORIAN: FRANK! Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD
Re: can't diffsplit
On May 31, 2007, at 3:02 PM, A.J.Mechelynck wrote: Lev Lvovsky wrote: I have two files which I'd like to compare via diffsplit in an existing vim session - trying to do so by issuing ':diffsplit filename' when the other one is already in the window gets me the error: E97: Cannot create diffs I can properly open the diff in a separate instance via 'vimdiff', as well as ':diffsplit' - is there something wrong with my existing session? thanks! -lev II. To diff two files already being edited: 1. make one file current 2. :diffthis 3. make the other file current 4. :diffthis 5. (Optional) Rearrange the windows (using ^W commands) to place them side-by-side. Great. this solved the error that I was getting... thanks! -lev