! Syntax Highlighting Patterns for diff ! Contributed by Andy Piper (andy.piper@freeuk.com) ! ! This patten should deal with patches generated as unified, context, ed ! or RCS-style diffs (i.e. created using diff -u, -c, -f or -n), but NOT ! side-by-side format (diff -y) ! ! In NEdit Version 5.1x load this pattern by starting nedit with: ! ! nedit -import ! ! Then, check that the patterns were loaded correctly, and choose Save Defaults ! from the Preferences menu. The new patterns will now be incorporated into ! your own .nedit file, so the next time you start NEdit, you will no longer ! need to use -import. ! ! In version 5.1, without -import, you must edit your .nedit file by hand and ! add the contents of each resource below to the corresponding list in your ! .nedit file. Be sure to separate new entries with \n, and continue resource ! strings by escaping all newlines within a resource value with \ (backslash), ! leaving only the last line of the resource value not ending in \. ! Syntax highlighting patterns for diff ! nedit.fileVersion: 5.1 nedit.highlightPatterns: Diff:1:0{\n\ File1:"^\\-\\-\\-\\s .*$":::DiffFile1::\n\ File2:"^(\\+\\+\\+\\s|\\*\\*\\*\\s|\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*).*$":::DiffFile2::\n\ Lines:"^(@@\\s|!\\s|\\.).*(@@$|$)":::DiffHunk::\n\ In:"^(\\+|a[0-9]*\\s[0-9]*).*$":::DiffIn::\n\ Out:"^(-|d[0-9]*\\s[0-9]*|c[0-9]*).*$":::DiffOut::\n\ } nedit.languageModes: Diff:.diff .patch:"^(---\\s.*$|\\+\\+\\+\\s.*$|\\*\\*\\*\\s.*$)"::::: nedit.styles: DiffIn:blue:Plain\n\ DiffOut:red:Plain\n\ DiffFile1:red:Bold\n\ DiffFile2:blue:Bold\n\ DiffHunk:purple:Italic