vimdiff

If you’re a command-line animal like I am you need to know vimdiff.

vimdiff in action

vimdiff in action

vimdiff is an interactive file comparison and merging utility for the command-line. It simply starts Vim in a special mode called the diff-mode. To get started with vimdiff from the command-line,

$ vimdiff oldfile newfile

2 pairs of commands will get you started:

  • Navigating: ]c and [c will take you to the next and previous diffs, respectively.
  • Merging: dp and do will merge the current diff from the current buffer into the other buffer, and from the other buffer into the current buffer — respectively. dp stands for diff-put and do stands for diff-obtain.
This entry was posted in Programming. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>