Questions tagged [vimdiff]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

vimdiff show differences with only parent rows

Two config files contain many blocks of the form block name { ..... sub block name1 { ......... sub block name2 { .... } } ..... } Example: Input (LHS) : ltm ...
0
votes
0answers
198 views

vimdiff show difference in full block

Two config files contain many blocks of the form block name { ..... ..... } Now with vimdiff, I am able see the differences storing as html as below. But I want to see the full block if at ...
2
votes
2answers
8k views

How to write the difference between two files into a file

Saying that I have two files: a.txt and b.txt. The content of a.txt: hello world The content of b.txt: hello world something else Of course I can use vimdiff to check their difference, I can make ...
0
votes
1answer
307 views

vimdiff: show only difference between “base” and “remote”

I'm merging two branches in a project, which both changed the same part of some files in different ways. The "remote" branch is somewhat closer to the common ancestor ("base"), so I want to only show ...
1
vote
1answer
302 views

How to get the unmatched lines in vimdiff

I am comparing a list of packages for a Django project in production and development. There are inconsistency in versions, but I am only concerned about the packages that got installed independently ...
0
votes
4answers
542 views

vimdiff - Weird Issue comparing 2 files

When I compare the below 2 files its comparing it wrongly. How to compare? All the rows are available in the file2 but its not working. When I do a "vim -d a b" its showing like the values are missing ...
8
votes
1answer
5k views

vimdiff / vim -d — how to show only the differences and fold all identical lines?

Is there a way we can exclude the lines which are same in the below output? I did a vim -d file1 file2 but its showing the differences and also some additions lines before and after the differences. ...
2
votes
1answer
126 views

Display headers using vimdiff or vim -d

I have 2 tables which I need to compare and display the differences. I am able to do that using the following command: vim -d table1 table2 -c :TOhtml -c :wqa The problem I am facing is it's ...
1
vote
1answer
188 views

vimdiff - Custom file name possible while we export?

I am comparing 2 files in a script and exporting to html file (Below is the syntax i am using). When the file get saved, its saving in a name called Diff.html by default. Is there a way we can save it ...
2
votes
1answer
589 views

diff - showing changed lines in different section than inserted lines

(I'm running into this in a context of using vimdiff, which relies on and interprets the output of diff, so I think this is a diff question.) Given these files, the first having 2 lines, the second ...
4
votes
1answer
198 views

How to disable vimplugins while invoking vimdiff command

I added few vim plugins like sytastic, nerdTree. They change the status line and other UI elements, which works fine while editing files. But when I invoke vimdiff on 2 files, the nerdTree pane also ...
9
votes
2answers
419 views

diff characterwise

Is there a stable tool (option/plugin of an existing tool: vimdiff, diff, etc) in Linux to do diff between two text files characterwise? I would like to see the longest common subsequence between my ...
15
votes
1answer
4k views

vimdiff to compare output instead of files

I am trying to compare two command output (no files) vimdiff "$(tail /tmp/cachain.pem)" "$(tail /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem)" I tried playing with redirection, pipe, and vim - -...
3
votes
4answers
2k views

Comparing files with vimdiff from a script

I'm writing a script to compare two directories recursively and run vimdiff when it finds a difference: #!/bin/bash dir1=${1%/} dir2=${2%/} find "$dir1/" -type f -not -path "$dir1/.git/*" | while ...
2
votes
1answer
272 views

Vim and unified diffs

In my daily work, I only deal with unified diffs, so I would like to define the alias alias diff='diff -puN' in my .zshrc. This alias is not respected when I use the shell from the vim command line ...
1
vote
2answers
438 views

Is there a sudoedit equivalent for vimdiff?

I'm trying to get into the habit of editing root-owned files with sudoedit, instead of sudo vim. This has a few advantages, one of which is that it uses my user's ~/.vimrc. Is there an equivalent, ...
9
votes
1answer
3k views

Identify duplicate blocks of text within a file

Is there a convenient way to identify duplicate or near duplicate blocks of text within a file? I want to use this for identifying code duplication. It looks like there are specialty programs with ...
12
votes
5answers
5k views

How to know if a text file is a subset of another

I am trying to find a way to determine if a text file is a subset of another.. For example: foo bar is a subset of foo bar pluto While: foo pluto and foo bar are not a subset of each other... ...
7
votes
3answers
2k views

Make vimdiff display different lines as different lines (not partially different)

vimdiff has an annoying habit of displaying two almost-completely-different lines as the same partially-different line just because they share a character in common at the beginning or end. For ...
3
votes
1answer
1k views

How can I see moved lines in a file comparison with vimdiff / diff?

Moved lines are frequently annotated as deletes and adds but they can be shown as moved-from and moved-to instead. Like in this screenshot of Notepad++.
23
votes
6answers
14k views

vimdiff disable/enable color coding

Is there any way to quickly disable/enable color coding in vimdiff ? The problem is, I have colored text in vim and the text is invisible is the text-color is Red, and the vimdiff too tries to put a ...