51

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?

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
Andreas Järliden
  • 1,884
  • 1
  • 17
  • 16

1 Answers1

43

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=.

Ingo Karkat
  • 167,457
  • 16
  • 250
  • 324
  • 40
    Although maybe not as complete as Ingo's ConflictMotions plugin. Tim Pope's unimpaired.vim provides some conflict motions as well. `[n` and `]n` jump to the previous and next conflict markers. Unimpaired.vim provides many other helpful mappings that are well worth a look in my opintion. https://github.com/tpope/vim-unimpaired – Peter Rincker Jan 17 '13 at 18:35
  • So the answer is without plugins there is no standard solution for this? – erikbstack Feb 06 '14 at 20:25
  • 19
    @erikb85: Without plugins, you have to do searches like `/^<<<<<<<`. – Ingo Karkat Feb 09 '14 at 21:01
  • 5
    The plugins seem like a great idea. Without those, I usually use a search like `/<<<<<<<\|=======\|>>>>>>>` and then I can use `n` and `p` to skip around between the markers. Not quite as nice as those plugins, clearly, but it works. – bryant Mar 05 '20 at 06:53