how can I diff two sections of the same file?
The linediff plugin for Vim works well for me. Visually select one section of your file and type :Linediff
. Visually select the other section and type :Linediff
. It will put vim in to vimdiff mode, showing only the two sections you highlighted previously. Type:LinediffReset
to exit vimdiff mode.
More info:
https://unix.stackexchange.com/a/52759/32477
https://superuser.com/a/414958/199800
I use Beyond Compare.
It allows you to select a line on each side and say 'Align Manually'. This should work just fine for you.
KDiff3 is open source and available on several platforms including Win32 and Linux.
It has the "manual alignment" feature discussed by Gishu about Beyond Compare (which by the way I haven't been using personally but is considered a great tool by many people I know).
See this answer for more examples.