Questions tagged [vimdiff]
The diff feature of vim lets show differences between two, three or four versions of the same file
127 questions
1
vote
3
answers
164
views
How can I avoid garish vimdiff change highlighting without going into deep vim voodoo?
I am but a simple man… I work on a black-background, light-gray foreground terminal, and I am a long-time, but in no way an expert, user of Vim. Disliking the default color scheme, many years ago I ...
0
votes
3
answers
86
views
Vimdiff counting dark blue lines (unique added lines)
Would there be a command to count the dark blue lines (not simply adding line number on the rows) on the vimdiff Bookmarks1 Bookmarks2 please?
Once I figured out how many extra lines there are, I can ...
1
vote
3
answers
149
views
Skip pattern in vimdiff
I often use diffthis to compare timestamped logs e.g. from dmesg. I would like to skip those timestamps when computing the diff so the two lines below are considered the same:
[ 0.003621] Early ...
1
vote
1
answer
120
views
Change settings when using vimdiff
I have a function that changes settings for diff mode (usually activated by using vimdiff).
Manually calling this function works as expected.
However, I would like this function to be called ...
1
vote
1
answer
222
views
How to jump to next modified (not added or removed) line in a diff?
:help jumpto-diffs gives commands to jump between changes in a vimdiff:
Two commands can be used to jump to diffs:
*[c*
[c Jump backwards to the previous start ...
4
votes
1
answer
399
views
Check for diff mode while using git mergetool
I am using Neovim v0.10.0 and have the following config for git difftool:
[diff]
tool = nvimdiff
[difftool]
prompt = False
trustExitCode = true
[difftool "nvimdiff"]
cmd = ...
0
votes
1
answer
689
views
AstroNvim in diff mode: navigating to next difference
In plain old (n)vimdiff, one can jump to the next/previous difference using [c or ]c respectively. (says :help diff documentation, at least)
Not so much in my AstroNvim; running nvim -d -R old.txt new....
4
votes
4
answers
1k
views
Vimdiff bad line alignment and subsequent diff visualization
Let's say I have two files with the following contents:
this is some important text
another different line
if another is needed
here it is
and
this is some important text
we now first add two new ...
1
vote
1
answer
210
views
Force TOhtml to generate a HTML output rather than a HTML5 output in Ubuntu 22.04.3 LTS
My python code opens a subprocess which in turn calls vimdiff and :toHTML.
Snippet added below:
subprocess.check_call(
[
"vimdiff",
...
1
vote
1
answer
761
views
How do I change the color of the deleted text on the left side of a vimdiff?
My colors currently look like this, with the text highlighted green on both sides:
I would like it to be red on the left, and green on the right.
I tried to change the DiffDelete highlight, but that ...
1
vote
1
answer
118
views
DiffOrig, but show the patch
Vim help suggests a nice command to show a side-by-side diff of the current buffer since the last save:
command DiffOrig vert new | set bt=nofile | r ++edit # | 0d_
\ | diffthis | wincmd p | ...
3
votes
1
answer
669
views
How to diff the current text and the clipboard?
How to create a diff of the current text and the clipboard?
It could result in a vertical split showing the clipboard content, and a normal diff between them.
Opening a vertical split, pasting and ...
1
vote
2
answers
239
views
vimdiff to operate on only the cursor line
If I have a block of contiguous flagged lines in vimdiff, then it treats them as if they were a single diff, and pressing 'dp' sets the other buffer the same for the entire block.
Is it possible to ...
0
votes
1
answer
110
views
Detect when a diff begins and ends?
How can I detect when a diff begins and ends?
By "diff" I mean when at least 2 buffers are in diff mode (i.e. they are scroll-bound and diff syntax highlighting is visible).
I'm not asking ...
1
vote
0
answers
105
views
How can I highlight the line number with diffadd and diffadd and diffdelete
I want line numbers to be highlighted for diff files depending on added lines and removed lines. For added lines, the line number should be green. For removed lines, the line number should be red. I ...