Jump to next merge conflict
If you’re using source control like Git, SVN, or Mercurial then you’re probably accustomed to resolving merge conflicts. There are a variety of tools available to you in Vim to make merge conflict resolution easier.
The tool that has become most essential to my workflow is a set of mappings provided by the Unimpaired plugin to jump to the next conflict marker:
]ngoes to the next conflict marker
[ngoes back to the previous conflict marker
You can also use these with
d to delete until the next marker or delete back to the previous marker. This makes quick work of picking which half of the conflict you wish to keep.
d]ndelete till the next conflict marker
d[ndelete back to the previous conflict marker
Here’s a short demo of these mappings in action. If you have large files or a lot of conflicts, use
]n to rip through them quickly.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?