Diff with vimdiff
by Danilo • January 20, 2011 • Tips, Utilities • 1 Comment
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.
If you enjoyed this post, make sure you subscribe to my RSS feed!
I’m still a big VIM fan even though most of my friends think it’s kind of obsolete. From my point of view it does the job so why replace it if it’s not broken ?