Diff with vimdiff

Categories: Tips Utilities

For those who are vim fans, a quick tip on how to run a diff/merge  task:

Open the files with:

vimdiff file1 file2 file3   –> Vertical split is default

vimdiff -o file1 file2 file3  –> If you’d like horizontal split of files

To jump between files:

Ctrl-W w

To jump places where differences are found:

]c    –> to see next part of a change

[c   –> to go back to the start of a previous part of a change

These are just the quick basics, there are a ton of other commands listed on Vim’s documentation page.