Questions tagged [vimdiff]

vimdiff is a vim mode that can show differences between two, three or four files.

vimdiff is the same as vim -d or using :diffthis on several windows in the same vim tab.

Use dp to propagate a difference and do to get it, ]c and [c to navigate between differences.

202 questions
4
votes
1 answer

Git Mergetool: "No files need merging"

I am trying to configure git mergetool with vimdiff on Cygwin. I have set the the tool in my git config using: git config --global merge.tool vimdiff However, when I perform a merge that results in "Automatic merge failed; fix conflicts and then…
4
votes
1 answer

git vimdiff mergetool basic commands?

I have executed git mergetool to try to resolve some merge conflicts. It opens 3 text windows (within my SSH terminal) with different versions of code in each. The code I want is in the window on the right. How do I tell git to take this version and…
Alex R
  • 11,364
  • 15
  • 100
  • 180
4
votes
1 answer

Why does git difftool use git diff instead?

I want git diff to be a quick command line solution to see the difference between two files, and then I want git difftool to launch meld for a more graphical view of the file differences. Currently, git diff does exactly what I want it to, however…
Zach Olivare
  • 3,805
  • 3
  • 32
  • 45
4
votes
1 answer

Suppressing Vimdiff message

I tried looking online and it seems that no one has a simple answer to it. In my bash script, I use vimdiff for two files, but after I close the vimdiff it shows "2 files to edit" whenever the files differ. It seems like no one has the solution to…
user3281743
  • 295
  • 1
  • 11
4
votes
3 answers

vimdiff as a merge tool

vimdiff helps in showing the diff of two files graphically and allows us to pick the changes from left to right/right to left. The files I am dealing with are huge files and most of the differences vimdiff reports can be auto-merged except a few.As…
Naga Kiran
  • 8,585
  • 5
  • 43
  • 53
4
votes
2 answers

Is there a way to configure vimdiff to ignore whitespace on lines that have a non-whitespace diff?

When diffing two files in vim (e.g. vim -d file1 file2), I want all whitespace to be ignored. I almost achieved this by following the advice of Adam Katz in this question: Is there a way to configure vimdiff to ignore ALL whitespaces? That advice…
Bjorn
  • 43
  • 1
  • 3
4
votes
1 answer

Line numbers with side-by-side diff

I want to write a shell script that diffs two files, and dump the result into another file. I find sdiff to be more intuitive than just diff. However, sdiff doesn't print out the line numbers of where the differences are. I also tried vimdiff,…
jh314
  • 27,144
  • 16
  • 62
  • 82
4
votes
1 answer

Using vimdiff to find differences in a particular column

I have a very large csv file where every field is the same width (hence every line is the same width). I need to find the differences in a specific column. When I open 2 files in vimdiff, most lines are marked as a diff, because there is a regularly…
Tom
  • 2,214
  • 2
  • 16
  • 28
3
votes
4 answers

closing pending vim windows to open

I know that I can close all opened buffers in vim by :qall. I want to close event to pending opening buffers. I have problem while reviewing my changes in P4 sandbox. When I have changes in multiple files and I try to review my code with "P4 diff"…
shampa
  • 1,350
  • 3
  • 13
  • 22
3
votes
2 answers

Defining a shortcut only in vimdiff

I have been using vimdiff in its vimdiff1 layout, where it opens side by side the two buffer of LOCAL and REMOTE. The reason I preferred this layout over the other standard layout is the two shortcuts do and dp for getting and putting diff chuncks…
3
votes
1 answer

vimdiff: Is there a possibility to find out if the cursor is in a DiffAdd block?

I'm trying to find out in a script if the current cursor position is a block of lines that were added. Is this somehow possible using vim script? So far I tried to match for the background color of the current line and the highlight group but…
Steven Thiel
  • 153
  • 4
3
votes
1 answer

Did the behavior of `hg backout` change since the hg book was written?

I created a new repository, test-backout, and added a new file in it, file. I then made 4 commits, each time, appending the number of the commit to file using echo [manually entered number] >> file hg commit -m '[manually entered number]' In…
cesar
  • 8,944
  • 12
  • 46
  • 59
3
votes
1 answer

Git partial merge conflict resolve in a file with vimdiff

During a merge conflict resolution, is there a way to resolve only some conflicts of a file without marking this file as "solved" or checkout the file as conflicted without loosing the hunks already edited? Currently I'm using vimdiff as mergetool.…
LBald
  • 473
  • 2
  • 11
3
votes
2 answers

Why doesn't "Diff with Vim" command work?

I am running gVim on WinXP. I open a folder, select two files, and click "Diff with Vim". Screenshot: The gVim GUI starts up, with each of the files in its own tab. I notice that each tab is in DIFF mode. However, there is no comparison being made…
drapkin11
  • 1,205
  • 2
  • 12
  • 24
3
votes
5 answers

Is there any way to queue many pairs of files for comparison with vimdiff?

I have a few dozen files I need to compare and merge with vimdiff. Is there any way to queue pairs of files for comparison so that I may open them all at once, rather than returning to the shell again and again to open each pair of files? Could…
Michael Berkowski
  • 267,341
  • 46
  • 444
  • 390