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
19
votes
2 answers

how to use vimdiff in VIM command mode?

I want to use :vimdiff file1 file2 to diff these files in VIM command mode , but I got a error message E492: Not an editor command: vimdiff . do I forget something ? how to resolve it? According Vim manual, vimdiff command should be available
stackFish
  • 597
  • 4
  • 12
19
votes
3 answers

How do you cancel an external git diff?

I've got vim setup as my external diff tool: [diff] external = git_diff_wrapper #!/bin/sh vimdiff "$2" "$5" Say I have 300 files that have been modified; via bash, I type "git diff". It launches 300 vimdiffs sequentially, how do I abort…
v2k
  • 1,083
  • 9
  • 13
18
votes
2 answers

VIM - Show the diff of last saved version and current unsaved version

Possible Duplicate: Can I see changes before I save my file in Vim? Duplicate: Can I see changes before save my file in Vim? Is there a way to see the diff of the saved version and the edited version of the same file in VIM? This is the…
Srikanth
  • 11,780
  • 23
  • 72
  • 92
18
votes
1 answer

copy-paste lines between tabs in vimdiff

I'm using vimdiff to see the difference between two files. I'm wondering if it is possible to copy a line from the left tab (the first file) and paste it in the second tab (the second file). Actually, I can't even seem to be able to access the…
nay
  • 864
  • 2
  • 8
  • 12
17
votes
3 answers

Undoing diff put when copying lines between vimdiff windows

If, at a command prompt, I run vimdiff file1 file2 I get a vim instance that has two files open side-by-side. Let's suppose that the text in the files looks like this (file1 is on the left, file2 on the right): ╔═══════╤═══════╗ ║foo …
user82216
16
votes
1 answer

VimDiff E93: More than one match for RE

So I am new to using vimdiff, however I feel like there is some error. Whenever I try to choose the changes from the remote repository with the command: :diffg RE I get the error: E93: More than one match for RE Not sure where this is coming from…
16
votes
3 answers

vimdiff: force line-by-line comparison (ignore supposedly missing/additional lines)

How do I force vimdiff to always compare two files line-by-line without identifying added or deleted lines? The problem is that if the diff between two files is large, but by chance two lines in the file match up, vimdiff thinks these lines are the…
flotzilla
  • 1,181
  • 1
  • 13
  • 23
15
votes
3 answers

ignore lines with particular words in vimdiff output

I have 2 large files to take vimdiff. In vimdiff output I want to ignore lines showing diff but have a particular word. e.g. in my case I want to ignore diff of all lines with prefix WARNING: in my files. Thanks,
ravi
  • 3,304
  • 6
  • 25
  • 27
14
votes
2 answers

How to get gVim's vimdiff to ignore case?

I am trying to compare two assembly files where one was written all caps and the other in lowercase. Many lines are identical up to case and whitespace. I tried the following, while two buffers in diff mode: :set diffopt+=icase :set…
ysap
  • 7,723
  • 7
  • 59
  • 122
13
votes
2 answers

Using vimdiff with a different .vimrc?

I've been using Vim now for most of my editing for the last week or so and I'm loving the experience. However I have an issue. I've setup my .vimrcfile with NERD_tree and a few other goodies. This works well for when I'm coding. However on…
Brent Taylor
  • 867
  • 1
  • 9
  • 12
13
votes
3 answers

"More than two buffers in diff mode" - How do you turn off diff on the buffers?

I did :vert diffsplit file1.txt, then realized I didn't want to diff it but a different file. So I closed one window with :q and turned off the diff highlighting with :diffoff. I then tried :vert diffsplit file2.txt, but now if I try to dp or do…
keflavich
  • 18,278
  • 20
  • 86
  • 118
11
votes
2 answers

Mark difference as ok in vimdiff

I have a couple of large json files that I need to check for errors and was wondering if it is possible to mark a difference as ok and have that apply for the whole diff session thereby eliminating it further down in the file. example Name: Donald…
Sedrik
  • 2,161
  • 17
  • 17
11
votes
3 answers

How to select the entire REMOTE file during mergetool?

I'm using CLI mergetool vimdiff and rather than going line by line and typing :diffg RE for every change to select the REMOTE version, is there a way I can just have the REMOTE version of the entire file as the target merge?
jsstuball
  • 4,104
  • 7
  • 33
  • 63
11
votes
3 answers

Vimdiff - How to hide all same lines in both files and show only different ones

vimdiff file1 file2 besides differences shows also same lines from both files. Is it possible to hide them? How to do it?
LookAheadAtYourTypes
  • 1,629
  • 2
  • 20
  • 35
10
votes
2 answers

What are the various "vimdiff" difftools/mergetools?

When I run git difftool --tool-help or git mergetool --tool-help, I see: vimdiff vimdiff1 vimdiff2 vimdiff3 What are these different "versions"? I assume they all start Vim with different options, but what are the options? Are they documented…
shadowtalker
  • 12,529
  • 3
  • 53
  • 96
1 2
3
13 14