Thursday, September 22

Tuesdays with vim, part 2 (on Thursday)

I’ve been using vimdiff for my code reviews, since it, unlike tkdiff can be run without worrying what my DISPLAY variable is set as. (Important for working with screen over ssh. Though there are workarounds.)

vimdiff automatically folds lines that have no changes in them. This is very convenient. The command to unfold and show the text is,
zo
which stands for “fold open” (if you believe that “z” stands for “fold”). To re-do the fold, and hide the unaffected lines, use “fold close:”
zc
These are typed from command mode and are not ex commands (so no :).