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
1
vote
1 answer

vimdiff - disable highlighting a particular line

I doing a code-review for a colleague. I have opened the diff using vimdiff. There are over 50 changes within the same file. Each line that has a diff is highlighted. Thus, I have close to 50 highlighted lines. As I work through the code review, I…
The Vivandiere
  • 3,059
  • 3
  • 28
  • 50
1
vote
1 answer

Setting up vimdiff as the mergetool for fossil

I have spent quite a bit of time looking for pointers or ways to set this up. I've used git at my previous job and my new job is using fossil. I'm a novice vim/vimdiff user and would like to keep using it as my daily driver. I'm having a hard time…
vw999
  • 63
  • 1
  • 4
1
vote
3 answers

Comparing contents of text files ignoring order and format

I have two text files that I need to compare the contents of because one of them is missing 2 items that the other has, but I'm not sure which since they are long. I've tried diff and vimdiff with no luck. My files are both formatted like this in a…
curious_cosmo
  • 1,184
  • 1
  • 18
  • 36
1
vote
1 answer

Unable to resolve hg merge conflict when using vimdiff

I am using the default version of mercurial without much modifications. By default it uses "vimdiff" for the purpose which I wasn't familiar with. I am going to explain the situtation: After 1st commit on default branch: #include int…
Compro Prasad
  • 162
  • 1
  • 14
1
vote
1 answer

vimdiff: start in second split?

When using vimdiff, I'd like to start in the second pane (my changes), instead of the first. I've tried adding this to my .vimrc, but it doesn't seem to work. Is there a different event I should be hooking? if &diff autocmd BufWinEnter * winc…
Eddie Parker
  • 4,770
  • 3
  • 35
  • 43
1
vote
2 answers

git difftool not working (ubuntu)

When running git difftool --tool=vimdiff the output I get is a diff, what I want is vimdiff... If I use git diff I get a diff | less I try configuring the global setting: git config --global diff.tool vimdiff the local setting, adding the…
Corentin
  • 11
  • 4
1
vote
1 answer

Give vimdiff some hints

I've got two c++ files that I want to diff with vimdiff. One of them has a lot more function definitions at the start, before both have a common function that I'm actually interested in. However, vimdiff seems incapable to ignore all the function…
GeckoGeorge
  • 446
  • 1
  • 3
  • 11
1
vote
2 answers

The hotkey "dp"(diff put) has a mapping conflict with vim-fugitive, when copying changes with vimdiff

When comparing files, I like to use vimdiff(or vim -d) and I know a recommended way of copying changes with vimdiff is: ]c - advance to the next block with differences [c - reverse search for the previous block with…
jack guan
  • 331
  • 2
  • 12
1
vote
1 answer

How do I make gvimdiff opened by git mergetool open all files at once in tabs?

Normally git -c merge.tool=gvimdiff mergetool opens files to be merged on by one, in batch mode: Normal merge conflict for '...': {local}: modified file {remote}: modified file 4 files to edit ... seems unchanged. Was the merge successful? [y/n]…
Vi.
  • 37,014
  • 18
  • 93
  • 148
1
vote
2 answers

Git conflict lines weird nesting

When I try to merge stage into master I get these weirdly nested conflict lines. As I try to pick the one I want to keep in vimdiff mergetool with :diffg LO and :diffg RE it does seemingly weird changes and I can never get to a proper merge…
a_rts
  • 319
  • 2
  • 13
1
vote
2 answers

Switching panes within Git's Vimdiff in Tmux

I'm using vim with tmux. I setup seemless pane switching between Vim splits and Tmux splits With commands like this: bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane…
newUserNameHere
  • 17,348
  • 18
  • 49
  • 79
1
vote
1 answer

VIM colorscheme for Fortran and/or C++

I have recently changed my terminal colour to light (black letters on white background). As expected, this changed the way in which vim highlights the syntax profoundly. I managed to find some *.vim files for Fortran syntax highlighting,…
Alexander Cska
  • 738
  • 1
  • 7
  • 29
1
vote
1 answer

Exclude one of the split windows from diff in vimdiff 3+ window

As per the subj, I'm looking for a way to exclude one of the split windows in vimdiff yet still compare the other 2+ windows (with colors and all that jazz). A use case: a file with keys and 2 files with values (same number of lines). I want to…
Alex
  • 627
  • 8
  • 15
1
vote
1 answer

vim: disable plugin by default (diffchar)

Recently (vimdiff: force line-by-line comparison (ignore supposedly missing/additional lines) ), I've found the quite useful vim plugin diffchar, which improves vimdiff by showing multiple diffs on the same line separated, instead of highlighting…
flotzilla
  • 1,181
  • 1
  • 13
  • 23
1
vote
2 answers

Limit vim syntax highlighting to diff

I am making changes to an existing C code. If I just want to check my changes, I can easily use vimdiff for that, with old & modified files. What I want is to limit some syntax highlighting to just the diff part. Particularly I need to highlight…
anishsane
  • 20,270
  • 5
  • 40
  • 73