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

How to make vimdiff to detect differences in line ending characters(dos vs unix)

When comparing two files with same content but with line endings, vim diff does not detect the difference. Is there a way to make vimdiff show the difference.
smbatpetrosyan
  • 609
  • 1
  • 6
  • 11
3
votes
1 answer

Vimdiff equivalent for Select Lines

When used as a mergetool for Git, what is the equivalent in vimdiff to kdiff3's "Select Lines(s) From A/B/C"? Is there a shortcut for that like Ctrl+1/2/3 in kdiff3?
sashoalm
  • 75,001
  • 122
  • 434
  • 781
3
votes
2 answers

How do I accept both changes in vimdiff hunk?

When resolving merge conflicts, a fairly common pattern is that both I and another person have modified a list or some other section of code which commonly gets appended to. Such…
Gabe Moothart
  • 31,211
  • 14
  • 77
  • 99
3
votes
0 answers

how can I connect midnight commander with vimdiff?

I've mananged to connect mc(midnight commanger) with vim. But unfortunatley I couldn't find a way to connect it with vimdiff. Is there a way to replace mcdiff with vimdiff??
windrg00
  • 457
  • 3
  • 9
3
votes
3 answers

vimdiff immediately becomes stopped job, crashes terminal when I try to fg it, but works with GUI

SOLVED: the problem was this line in my .vimrc: set shell=/bin/bash\ -li UPDATE: it appears the problem is due to my .vimrc (renaming the .vimrc to 'hide' it fixed the problem), so it probably has nothing to do with Mint. I'm running Linux Mint 17…
user3391564
  • 576
  • 1
  • 5
  • 16
3
votes
1 answer

The colors are jacked up when using Vimdiff from Git in Windows

I have configured Git to use Vimdiff as its diff/merge tool on a Windows machine. It works, but the colors are messed up. First, it won't show any syntax highlighting, no matter how much I tell it to turn the syntax on and set the filetype. Second,…
Keith Pinson
  • 7,835
  • 7
  • 61
  • 104
3
votes
1 answer

does vimdiff support merging diffs

Can vimdiff support a merge of diffs that are on the same line (so that I get the aggregate of them?) example: starting with the following conflict markers: I like apples peaches <<<<<<< HEAD bananas ======= cherries >>>>>>> diverge for supper in…
phatmanace
  • 4,671
  • 3
  • 24
  • 29
3
votes
2 answers

Using Preview on Mac, why does simply saving a PDF over itself with no changes made completely change the file's contents?

I have a 3 page PDF file open in Preview on the Mac. If I make no changes to the file, hit cmd-s and save the file, the binary content of the file changes heavily. Why is this? I can tell this is the case because of my process: make a duplicate…
k00k
  • 17,314
  • 13
  • 59
  • 86
3
votes
2 answers

MacVim - How to properly set up vimdiff to work with SourceTree?

I'm using MacVim as my editor and Atlassian SourceTree (v1.5.3) as my VCS frontend. I have MacVim's command line helper script mvim installed and mvimdiff properly symlinked. I want to use mvimdiff as a external diff tool for different kinds of VCS…
ryz
  • 131
  • 2
3
votes
3 answers

Vim swp files interfere with repository vimdiff

My setup is to use vim (specifically MacVim in graphical mode) to edit source files and then I do (mercurial) repository diffs using vimdiff (in graphical mode again). Sometimes, when I do a diff, vim gives me the error: Swap file…
Neil G
  • 32,138
  • 39
  • 156
  • 257
3
votes
1 answer

ignore new lines in vimdiff output

I know that I can ignore white space in vimdiff by se diffopt+=iwhte but I also want to ignore newline character in vimdiff. How can I do it? e.g. if (a>b){ bar()` would not be shown diff with if(a>b){bar() Thanks,
ravi
  • 3,304
  • 6
  • 25
  • 27
3
votes
1 answer

Vimdiff - How to extract similar lines in files and output them to a file

I am new to vimdiff and had a question about outputting the similarities of the two or more files into a new file. For example, based on the following picture I would like to have b,c,e,f,a along with the names of the two files being compared…
Javed Ahamed
  • 2,804
  • 6
  • 32
  • 41
2
votes
0 answers

git config does not set vimdiff layout properly, git 2.39

I'm trying to configure vimdiff as a git merge tool, so my global git config contains the following lines: [merge] tool = gvimdiff guitool = gvimdiff [mergetool] prompt = true [mergetool "gvimdiff"] layout =…
Barzi2001
  • 989
  • 8
  • 24
2
votes
1 answer

How to UNDO dp (or :diffput) in vimdiff, "u" doesn't work

I have started using vimdiff as my git difftool, and I have accidentally used the command dp (diff put) to put some code to the other file. However, pressing u does not undo that, and vim says at the bottom "Already at oldest change" Undoing do…
H.B.
  • 148
  • 8
2
votes
0 answers

how to get vimdiff apply both REMOTE and LOCAL changes?

when resolving a git conflict using vimdiff is it possible to apply changes from both buffers ? i tried :diffget RE LO and hoped that it would apply the changes in that order, so but it…
murison
  • 3,640
  • 2
  • 23
  • 36