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

vim search simultaneously across all split files

Is there a way to similary scroll to simultaneously go to next search instance on all split files? Currently I am using :windo // to search in all splits but pressing "n" only goes to next instance in active split window. I have 2 different files…
rawat89
  • 19
  • 7
0
votes
0 answers

What do the vimdiff key input sequences stand for?

I am recently started to use vimdiff. And I love it. And I found some pretty short key input sequences as shown below: But, the character key and the meaning is not that easy to remember. I guess the key sequence should have reasons why it is for…
Jumogehn
  • 1,102
  • 3
  • 11
  • 29
0
votes
2 answers

Is it possible to use the git merge tools on files that contain conflict markers (i.e., `<<<`, `===`, and `>>>`) *outside* a git repo?

Problem description When merging two branches in git with conflicting files, git adds markers to the conflicting areas. For example, a file with conflict would look like this Some code <<<<<<< HEAD Changes in branch A ||||||| cbf9a68 Original…
Amro
  • 130
  • 7
0
votes
1 answer

vscode: how to switch window in vimdiff as ctrl+w closes the window

I'm using vimdiff from VSCode's bash terminal. How do I go to the other window in vimdiff. Typically ctrl+w + right/left arrow is used to switch from one side to another. But VSCode capture ctrl+w and closes the window. I'm using VSCode with remote…
A. K.
  • 34,395
  • 15
  • 52
  • 89
0
votes
2 answers

Force diff/vimdiff to adjust line comparison

I'm comparing a couple files for differences using vimdiff. In this case, one file has 11 lines of comments describing the file whereas the other has no comment lines. I was surprised that vimdiff (rather, the underlying 'diff' ) did not accurately…
Mark Ebbert
  • 441
  • 3
  • 13
0
votes
1 answer

How to change the background color of diffs in Vim?

My current background color does not show some diffs properly
jibing
  • 41
  • 4
0
votes
1 answer

How to select multipe files for vimdif using vim?

Suppose I have some files in a folder. I browse the folder using vim vim myfolder. It lists the files, now I want to know how I can select two files and then open them in comparison mode (two tabs, ...)
Ahmad
  • 8,811
  • 11
  • 76
  • 141
0
votes
0 answers

How to get the exit code of Vimdiff command which gives the result of whether the two compared files were same or not?

For diff command, an exit status of 0 means no differences were found, 1 means some differences were found. What are the error exit values for diff? It works as expected with diff command. However, when I try the same with vimdiff command, it…
AutoTester999
  • 528
  • 1
  • 6
  • 25
0
votes
1 answer

Encoding Problem in Vimdiff?

How can you solve the following encoding problem? http://dl.getdropbox.com/u/175564/encoding.png It is rather hard to compare the manuals.
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
0
votes
3 answers

What does +-- mean in vimdiff output file? How to turn it off?

I use vimdiff to compare two text files. Each file has around 1000 lines. The diff works fine. However, it collapses/folds a few "same" lines like below in the output diff file: +-- 2 lines: | Opened browser Firefox CreateTest | Accounts : ->…
AutoTester999
  • 528
  • 1
  • 6
  • 25
0
votes
2 answers

Make vimdiff ignore unicode equivalence classes

I try to compare two directories synced by synching. I do this using the following: vimdiff <(cd "~/Pictures/shared" && find . | sort) <(ssh argon "cd ~/pictures/shared && find . " | sort) One machine is a recent archlinux box and the local…
ManuelSchneid3r
  • 15,850
  • 12
  • 65
  • 103
0
votes
2 answers

How do I prevent "/dev/null" from coming up when I run `git difftool --tool=vimdiff` when there is a new file?

While running git diff something similar to the image above shows up which takes a lot of screen space and makes it hard to read the new file. Is there some way to prevent the first screen from showing up on the new file while doing the diff?
Prathik Rajendran M
  • 1,152
  • 8
  • 21
0
votes
1 answer

vim keeps starting in vimdiff mode for some files

Somehow vim remembers that I did vimdiff on certain files and keeps opening them in the vimdiff mode. What that means is that when I open that same file again I get a grey bar displayed on the left (like the foldcolumn) but worse when I try to add…
KeepLearning
  • 349
  • 2
  • 3
  • 10
0
votes
1 answer

Git three-way merge on files already marked merged

In order to preserve the conflict resolution history of merging from master branch to development branch, I do a commit of the state as-is, followed by another commit of conflict resolution. In the first commit, I do nothing to resolve the…
jer_yin
  • 378
  • 1
  • 3
  • 13
0
votes
1 answer

vimdiff like view but for key lookup

I'm a simple user of vi. But now I'm looking for a bit more sophisticated solution. What I've in mind should look like a vimdiff view, but it's not about diffs. My first view has a file open with lines having one 'key' string as part of each…
Wolfgang R.
  • 333
  • 1
  • 2
  • 10