// -*- ASCII:EDT -*- // _install_diff.edt // (schlicht 20060218) LetReg(0,"> // ----------------------------------------------------------------------- % % % % % % % % Highlighting settings for Diff files % % % % % % % % % % > // ----------------------------------------------------------------------- // // This macro will install a new mode for viewing diff files // (the output of `diff` or `diff -u` ; extensions: ".diff" and ".patch"). // The following items will be highlighted: // // `diff` / `diff -u` // / --- base file // / +++ change file // Number / @@ start changes // < / - deleted line // > / + added line // // That's all! // // To uninstall the settings, run the macro _uninstall_diff.edt, // which will be created in the current directory. // // R Schlicht // ----------------------------------------------------------------------- "); Requires(20050701); Prompt("This will install %\%\%!0%\($Revision: 1.1 $)%\%\Continue?",1,0); AddMode("Diff","*.diff;*.patch"); LetReg(1,"Name:Diff: "); LetReg(2,"%\Before:0%\After:0%\Enabled:0%\Strict Priority:0%\Priority:0%\Color:1040"); WriteFile("%C\Diff_Filter Sets.dat",|Filter Sets: 259%\/% / Extracted from WinEdt 5%\%\> %!1+%\Definition:["+"]%!2%\%\%!1-%\Definition:["-"]%!2|); LetReg(2,"%\Stop:1%\Start1:%\"); LetReg(3,"%\Stop1:%\Stop2:%\Enabled:1Diff%\Strict Priority:0%\Priority:9%\ "); LetReg(4,"%\Case Sensitive:0%\Scope Flag:0%\Scope:2%\Indented:0%\BOLN:1%\%\"); WriteFile("%C\Diff_Switches.dat",|Switches: 259%\/% / Extracted from WinEdt 5%\%\> %!1+++%\Start:1Diff: +%!2Start2:++%!3Color:13324%!4> %!1---%\Start:1Diff: -%!2Start2:--%!3Color:13321%!4> %!1@%\ Start:1@%!2 Start2:@%!3 Color:13328%!4> %!1+%\ Start:1Diff: +%!2Start2:%!3 Color:1036 %!4> %!1-%\ Start:1Diff: -%!2Start2:%!3 Color:1033 %!4> %!1Num%\Start:1Numeric%!2Start2:%!3 Color:13328%!4> %!1>%\ Start:1>%!2 Start2:%!3 Color:1036 %!4> %!1<%\ Start:1<%!2 Start2:%!3 Color:1033 %!4> |); WriteFile("%C\_uninstall_diff.edt",|/% / -*- ASCII:EDT -*-%\/% / _uninstall_diff.edt%\> /% / generated by _install_diff.edt on %['GetDate(1,"c");']%!1%\> /% / ($Revision: 1.1 $)%\/% / --------------------%\%\LetReg(0,"%!0");%\> Prompt("This will uninstall%%\%%\%%!0.%%\%%\Continue?",1,0);%\> DelFilter("Diff: +");%\DelSwitch("Diff: +++");%\DelSwitch("Diff: +");%\> DelFilter("Diff: -");%\DelSwitch("Diff: ---");%\DelSwitch("Diff: -");%\> DelSwitch("Diff: @");%\DelSwitch("Diff: Num");%\DelSwitch("Diff: >");%\> DelSwitch("Diff: <");%\DelMode("Diff");%\HighlightingOK;%\> Prompt("%%!0 have been uninstalled.",0,1);%\End;|); AddFilters("%C\Diff_Filter Sets.dat");DeleteFile("%C\Diff_Filter Sets.dat"); AddSwitches("%C\Diff_Switches.dat"); DeleteFile("%C\Diff_Switches.dat"); HighlightingOK; Prompt("%!0 have been installed successfully.",0,1); End; // $Id: _install_diff.edt,v 1.1 2006-10-02 15:30:47+02 schlicht Exp schlicht $