DEV Community

Colin Bartlett
Colin Bartlett

Posted on • Originally published at vimtricks.substack.com

VimTrick: Resolving Merge Conflicts in Vim

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.

If you're not familiar with Unimpaired there are a whole host of very useful key mappings in it to make all kind of tasks faster.

The biggest help in there for merge conflicts are:

  • ]n goes to the next conflict marker
  • [n goes back to the previous conflict marker

There's also an easy way to delete each half of the conflict which I made a short screencast demo of over on my VimTricks post.

Oldest comments (0)