When performing big code changes like refactoring, comparing files can become tedious and time consuming. One way to reduce the load is to compare the file function by function or even snippet by snippet since, most of the time this is what you actually need. A plugin for vim that works very closely to the default diff tool of git vimdiff is linediff.vim.
Cheetsheet
^V
and use movement commands to select text:Linediff
to put selected text into buffer- repeat for second snippet
- Use
diffget
anddiffput
and rest of vimdiff commands as usual - Save both buffers once done