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
2
votes
1 answer

Git reporting a merge conflict, but hunks are identical

I'm trying to learn Fugitive with a live project, particularly resolving a merge conflict as I find doing this manually pretty tedious. I don't know if this is a valid question, because I cannot reproduce the effect outside of the repo I'm working…
Xophmeister
  • 8,884
  • 4
  • 44
  • 87
2
votes
2 answers

How do I get out of a messy merge when using vimdiff

I use vimdiff as my merge tool in mercurial. Sometimes I'll start a rebase that ends up being pretty messy and I just want to try and get out of the process and do something different. The way I end up doing this is usually just spamming :qa until…
Ziewvater
  • 1,413
  • 1
  • 18
  • 33
2
votes
1 answer

Vimdiff is not working in Git Bash, says E97: Cannot create diffs

Versions of things: OS: Win 8.1 Vim: 8.1 Git: 2.18.0.windows.1 GNU bash: 4.4.19(2) I am trying to use vimdiff in Git Bash but I get E97:Cannot create diffs error. From there both files are open next to each other but there is no syntax help for…
atoms
  • 85
  • 1
  • 8
2
votes
0 answers

How to customize the color of an HTML output file generated from Git Bash?

I have used the following command in Git Bash to perform a 'vimdiff' for 2 XML files. vimdiff xml1.xml xml2.xml -c TOhtml -c 'w! result.html' -c 'qa!' The HTML file which is getting generated is too flashy. The differences are highlighted in…
2
votes
0 answers

vimdiff: enable diff mode between certain buffers

This sounds like a trivial question, but I wasn't able to find an answer so far. I work with vimdiff as git mergetool. That means, when solving conflicts, I have four windows/buffers opened for editing: +--------------------------------+ | LOCAL | …
Eugeniu Rosca
  • 5,177
  • 16
  • 45
2
votes
1 answer

Vimdiff bring next diff at top or in the centre

While viewing diff of two files using vimdiff, when I do ]c to go to the next diff, the beginning of that next diff appears at the last line. Due to this, I have to scroll up few lines up to view the whole diff. Currently i do zt to take it to the…
Shod
  • 801
  • 3
  • 12
  • 33
2
votes
1 answer

Is there a way to adjust vimdiff's line position for a change?

I have fixed some indentation issues in my project and I'm looking at the vimdiff output for the before and after. I notice that vimdiff seems to be very confused as to what the actual changes are, rendering a pretty much useless output in this…
Alexander Rechsteiner
  • 5,694
  • 5
  • 34
  • 47
2
votes
1 answer

Please review my config. My vimdiff not working with GIT after setup

I used the commands following commands in order to make vimdiff my default diff tool under git. # git config --global diff.tool vimdiff # git config --global difftool.prompt false # git config --global alias.diff difftool My git config file looks…
ILikeTurtles
  • 1,012
  • 4
  • 16
  • 47
2
votes
3 answers

Unix: find all lines having timestamps in both time series?

I have time-series data where I would like to find all lines matching each another but values can be different (match until the first tab)! You can see the vimdiff below where I would like to get rid of days that occur only on the other time…
hhh
  • 50,788
  • 62
  • 179
  • 282
2
votes
3 answers

HTML conversion with vimdiff in shell script

In order to see the difference between two or more text files there is the diff command. But to see the difference with colors, after a little bit of research I found the vimdiff, with an option to export the difference to a HTML file with…
Tifou
  • 33
  • 1
  • 3
2
votes
1 answer

How to compare long lines with vimdif?

I compare two version of Latex file, using vimdiff. Lines in my file may contain as much as 30 sentences. The difference between the sentences are mostly small, like a typo, a word added or removed, word order reversed. If a line differs between the…
sjdh
  • 3,907
  • 8
  • 25
  • 32
2
votes
0 answers

VIMDIFF : Is it possible to specify unfold option such that the function which contains the changed diffs will not be folded?

I am looking for a functionality in vimdiff where on opening the diff, it could use the info. from cscope etc. such that the lines changed if are in within a function, that function will be unfolded and rest of the unchanged code should remain…
Kapil Jain
  • 21
  • 2
2
votes
1 answer

when using vimdiff how do I find the bottom of a block of changes

When using vimdiff there are times that I want to select a change, not just the top line of the change. what I've been doing is manually positioning the cursor at the bottom of the change and then using a macro which does a V[c{command such as y or…
hildred
  • 453
  • 11
  • 29
2
votes
1 answer

Function arguments not evaluating

I'm trying to set up a couple of maps to quickly go through merge conflicts. Here's my code: func! DiffAccept(w) diffget a:w diffupdate normal ]c endfunc noremap dh :exec DiffAccept("//2") noremap dl :exec DiffAccept("//3") Every…
Greg Wilbur
  • 633
  • 5
  • 9
2
votes
1 answer

How can I install vimdiff on Windows after installing git bash?

I usually use vimdiff when I want to see diff between two points in git. However, I can't find vimdiff in 'git bash' environment on Windows. Therefore, If anybody know how to install or use vimdiff in git bash console, please let me know.
sangheestyle
  • 1,037
  • 2
  • 16
  • 28