Linux.com

diffing and patching

Posted by: Anonymous Coward on May 11, 2006 02:42 AM
A great viewport most is the 'vimdiff' mode, for visually comparing files.

To open a new file and diff it with the current one, do ':vimsplit {filename}'. To do the same, but split vertically, do ':very vimpslit {filename}'.

Have a look at<nobr> <wbr></nobr>:help vimdiff for more info, but it really is quite useful. It's even better with cvscommand.vim or svncommand.vim scripts.

#

Return to Vim tips: Using viewports