Page 1 of 1

External Diff

Posted: Tue Dec 26, 2006 3:22 pm
by amif2000
This simple script will take the current buffer and the one to its right (in the tab order) and run an external diff between them.

To use a different diff utility, change the 'local cmd = ...' line.

Code: Select all

function key_macro()
 screen_update_disable()
 local fname1 = get_file_name()
 WindowNext()
 local fname2 = get_file_name()
 WindowPrevious()
 screen_update()

 local cmd = 'winmerge.exe /e "' .. fname1 .. '" "' .. fname2 .. '"'
 --message_box(1,cmd)
 system(cmd)

end
key_macro()
Amit