1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
colorize DIFF {
SyntaxParser = 'SIMPLE';
color {
{ 'Normal', 'Editor_Default' },
{ 'Old', 'DIFF_Old' },
{ 'New', 'DIFF_New' },
{ 'Changed', 'DIFF_Changed' },
{ 'CPreprocessor', 'Lang_Preprocessor' },
};
h_state 0 { 'Normal' }
h_trans { 1, '^<s', '+>', 'New' }
h_trans { 2, '^<s', '-<', 'Old' }
h_trans { 3, '^<', '!', 'Changed' }
# Unified diff line markers: <wirawan0>
h_trans { 4, '^<', '@@', 'CPreprocessor' }
h_state 1 { 'New' }
h_trans { 0, '$', '', 'Normal' }
h_state 2 { 'Old' }
h_trans { 0, '$', '', 'Normal' }
h_state 3 { 'Changed' }
h_trans { 0, '$', '', 'Normal' }
# just to mark the hunk boundaries (unified diff)
h_state 4 { 'CPreprocessor' }
h_trans { 0, '$', '', 'Normal' }
}
mode DIFF: PLAIN { # unix/gnu diff
FileNameRx = /\.\c{{DIFF?}|{D?PATCH}}$/;
FirstLineRx = /^diff /;
HilitOn = 1;
Colorizer = 'DIFF';
MultiLineHilit = 0;
}
oinclude 'mym_diff.fte';
|