202 questions
1
vote
0
answers
27
views
Can vimdiff do directory diffs? [duplicate]
I've been spoiled by GUI diff tools like meld, kdiff3 etc. Now I'm stuck having to do some git diff'ing via a terminal. If I:
git difftool --tool=vimdiff HEAD~
I get pairs of files which need to be ...
0
votes
1
answer
40
views
How to apply column before vimdiff
if I have 2 files, file_a and file_b, how can I vimdiff the two files after applying column -t to both of them.
0
votes
1
answer
126
views
vimdiff style color question: top & bottom lines
I cannot find what the highlight name (or highlight group) is to change the guifg and guibg colors of the top and bottom lines in vimdiff. (The bottom line above the statusline, that is).
(More ...
0
votes
0
answers
90
views
How to select all the matched files using vimdiff so that non matching files are deled
I have a ligand folder lig1 containing about 2000 files in .pdbqt format like:
compound_117_uff_e=945.53.pdbqt
compound_11800_uff_e=593.20.pdbqt
compound_11801_uff_e=543.18.pdbqt
compound_11802_uff_e=...
1
vote
2
answers
209
views
git diff - git difftool - vimdiff - How to compare two files from column 1 to 72 - It's possible config one of this tools
For mainframe modernization I'm using git to modify my Cobol programs.
To compare two programs one in Dev stage and another in Prod stage, I would like to compare them only from column 1 to 72.
I ...
2
votes
2
answers
1k
views
merge two files with nvim -d or vimdiff
Yesterday the arch community announced the successful migration to git. Congrats at this point.
Reading the news article and the steps to use the new repositories I stumbled over the lines "merge ...
3
votes
1
answer
150
views
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 &...
3
votes
2
answers
402
views
Defining a shortcut only in vimdiff
I have been using vimdiff in its vimdiff1 layout, where it opens side by side the two buffer of LOCAL and REMOTE. The reason I preferred this layout over the other standard layout is the two shortcuts ...
3
votes
1
answer
69
views
vimdiff: Is there a possibility to find out if the cursor is in a DiffAdd block?
I'm trying to find out in a script if the current cursor position is a block of lines that were added. Is this somehow possible using vim script?
So far I tried to match for the background color of ...
0
votes
0
answers
62
views
vimdiff: Move cursor into a block of deleted lines
When I open two files using vimdiff side by side I cannot put the cursor into a block of deleted lines. vimdiff instead jumps over them. How can I configure vimdiff such that diffs are still side by ...
0
votes
1
answer
355
views
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 ...
1
vote
0
answers
194
views
iTerm2: What is the best way to compare / diff two panes (like vimdiff)?
I would like to compare two panes in iTerm2, like I can do it in vimdiff.
(Or is it the best way to do it in vimdiff, not using iTerm2 panes??)
– I couldn't find anything in the documentation.
– And ...
0
votes
2
answers
712
views
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
<<<&...
0
votes
1
answer
921
views
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 ...
4
votes
2
answers
656
views
List pairs of files when using vimdiff as git difftool
I'm using vimdiff as tool when comparing with git difftool.
I want to compare 2 commits with git difftool <commit1> <commit2>.
Today, I have to exit every vimdiff view with :qa to get to ...
3
votes
2
answers
1k
views
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 (...
2
votes
2
answers
538
views
Is there a way to stop `git diff-tool` when return code is non-zero from the diff-tool is non-zero
I am aware of the git config option difftool.prompt true
However, I am wondering if there is a way to stop diffing when return code is non-zero. I am using vim as diff-tool and if I exit using :cq it ...
3
votes
1
answer
570
views
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 ...
3
votes
0
answers
1k
views
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
<some content>
...
0
votes
1
answer
1k
views
How to change the background color of diffs in Vim?
My current background color does not show some diffs properly
11
votes
2
answers
3k
views
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 ...
1
vote
2
answers
664
views
VimDiff as Git MergeTool : How To resolve all merge conflicts with changes from LOCAL,BASE or REMOTE with one command?
I want to know :
How To resolve all merge conflicts with changes from LOCAL,BASE or REMOTE with one command ?
This must be possible right ? I am struggling with this for 2 hours now....
Or is there ...
0
votes
1
answer
77
views
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, ......
3
votes
1
answer
477
views
Git partial merge conflict resolve in a file with vimdiff
During a merge conflict resolution, is there a way to resolve only some conflicts of a file without marking this file as "solved" or checkout the file as conflicted without loosing the hunks ...
2
votes
1
answer
1k
views
How can I use git difftool on a patch file?
As the opening title suggests, I am trying to produce a side-by-side diff using git difftool. I am in an environment s.t. vimdiff is the only available tool on these computers and am using CLI ...
-1
votes
3
answers
78
views
find identical keys with different values from two text files
I have two files which have data in a format like this:
cat File1.txt
A: 1
B: 2
C: 3
D: 4
E: 5
cat File2.txt
A: 10
B: 2
C: 30
D: 4
F: 6
I was wondering how I could print the diff for common keys ...
1
vote
2
answers
845
views
How to run vimdiff from a python daemon
I've been having some problems with vimdiff, python and daemons.
The thing is, I cannot use vimdiff with python when running the program as a daemon, I don't know what happens it just doesn't generate ...
1
vote
1
answer
653
views
Configuring vimdiff splits with specific statusline / line-numbers
I'm trying to set up git mergetool to spawn vimdiff with the following splits (and a configuration customized to each split):
Splits from the following buffers $LOCAL, $BASE, $REMOTE, & $MERGED (...
3
votes
1
answer
2k
views
How to make "git difftool --dir-diff" working with vim
I am happy working with git difftool --dir-diff with beyond compare to show overall diff across directories and files and navigate through them.
However when it comes to vimdiff, seems it do not ...
2
votes
1
answer
557
views
Git reporting a merge conflict, but hunks are identical
I'm trying to learn Fugitive with a live project, particularly resolving a merge conflict as I find doing this manually pretty tedious. I don't know if this is a valid question, because I cannot ...
0
votes
0
answers
298
views
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, ...
1
vote
3
answers
1k
views
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: | ...
1
vote
1
answer
239
views
How find word differences in files with very big lines
My question is if there is a tool in linux to find the difference in two files with lines so big as 39604 chars.
I tried with vimdiff, kompare, diff, colordiff, wdiff and other tools and none of them ...
1
vote
1
answer
180
views
using vimdiff in git-merge, how can I show the commit ids?
I am doing a cherry-pick that resulted in a merge conflict and when I resolve it, the default merge tool, Vimdiff, is opened. With 4 panes, the top being the Local , base , and remote. However I ...
2
votes
2
answers
386
views
How do I get out of a messy merge when using vimdiff
I use vimdiff as my merge tool in mercurial. Sometimes I'll start a rebase that ends up being pretty messy and I just want to try and get out of the process and do something different. The way I end ...
0
votes
2
answers
55
views
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 ....
11
votes
2
answers
11k
views
How to successfully exit "vimdiff" (which is used as a merge tool for "git") without saving?
I am new to this, so apologies about the basic question.
I am using an Ubuntu environment. I have git installed. I setup vimdiff as the merge tool.
I am testing the environment, but I am having a ...
0
votes
2
answers
321
views
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 ...
0
votes
1
answer
176
views
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 (...
5
votes
1
answer
838
views
vimdiff E97 in Powershell
I am having trouble getting vimdiff to work on a Windows 10 machine. I am running vim from Powershell. Powershell is also declared in $myvimrc as my shell of choice:
set shell=C:\WINDOWS\system32\...
1
vote
1
answer
68
views
How can I merge two lines from one revision and a third from the other in vimdiff?
I am merging two git branches together. I am using vimdiff to do this, so there are three vim panes shown in my terminal.
This same conflict arises hundreds of times in my merge:
Every time I come ...
0
votes
1
answer
683
views
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 ...
13
votes
3
answers
4k
views
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 ...
1
vote
0
answers
159
views
Why navigate to other windows in vimdiff?
If I understand correctly, (when using git mergetool with vimdiff and diff3 configured) only the MERGE version at the bottom is editable, in that saving changes here will result in a change to the ...
0
votes
1
answer
75
views
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 ...
-2
votes
1
answer
567
views
launching vimdiff from diff output
I am trying to diff two folders using diff and launch vimdiff for each difference from a shell script
This is how I extracted filenames and made complete command using awk which I like to execute
$ ...
3
votes
1
answer
2k
views
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.
6
votes
2
answers
757
views
open repo file instead of a tmp file to modify in git difftool
git difftool --tool=vimdiff --no-prompt HEAD~1 HEAD
git will open vim with two temporary files on the left and right side. Is there a way to force open the repo file on the right so that I can modify ...
0
votes
1
answer
52
views
How can I undo editing an indexed file in Git?
This looks strange but I don't understand what happened.
I was checking the gitdiff using vimdiff (using vim-fugitive). Then, while being in the indexed buffer, I presed dp which should put the ...
1
vote
2
answers
1k
views
Can we execute vim commands from a shell script inside jenkins?
I have a @Test method written in java which calls a shell script. The shell script contains vimdiff command used for generating code comparison between two html files.
When I run this test method ...