DEV Community

Colin Bartlett
Colin Bartlett

Posted on • Originally published at vimtricks.substack.com

1 1

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.

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay