Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Navigate to next conflict with vimdiff

In vimdiff you can use [c and ]c to go to the previous or next change, but when doing three-way merging many of those changes are not conflicts. Is there a command to go to the next conflict, not the next change as in e.g. Kaleidoscope?

like image 426
Andreas Järliden Avatar asked Jan 17 '13 10:01

Andreas Järliden


People also ask

How do you resolve conflicts in Vimdiff?

Resolving merge conflict with vimdiffSave the file and quit (a fast way to write and quit multiple files is :wqa ). Run git commit and you are all set!

How do I use Vimdiff as Mergetool?

In Vim, open a file with conflict markers, and start mergetool. vim-mergetool would show 2-way diff in a new tab with $MERGED file on the left. By default, all conflicts are already resolved by picking up ours/LOCAL version. You don't need to edit raw conflict markers manually.

How do I use git Mergetool to resolve conflicts?

Concepts for resolving Git conflictsREMOTE - the head for files(s) from a remote location that you are trying to merge into your LOCAL branch. BASE - the common ancestor(s) of LOCAL and REMOTE . MERGED - the tag / HEAD object after the merge - this is saved as a new commit.


1 Answers

You mean conflict markers such as <<<<<<<, =======, and >>>>>>> on merges to indicate that the automatic resolution failed?!

You can use my ConflictMotions plugin for that; it provides ]x and [x mappings, ]= for navigation within a conflict, and even corresponding text objects ax and a=.

like image 53
Ingo Karkat Avatar answered Oct 22 '22 07:10

Ingo Karkat