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
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 ...
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 ...
3
votes
1
answer
151
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
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
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 ...
0
votes
2
answers
714
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
<<<&...
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 ...
2
votes
2
answers
540
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
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>
...
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 ...
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, ......
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
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 ...
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 ...
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
1
answer
240
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 ...
2
votes
2
answers
387
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 ...
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
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 (...
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 ...
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 ...
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 ...
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.
0
votes
1
answer
56
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 ...