nano/syntax/patch.nanorc
Benno Schulenberg 84b1fdf6c6 syntaxes: add a license line to files that were created by Mike Frysinger
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2025-05-08 10:31:44 +02:00

30 lines
677 B
Plaintext

## Syntax highlighting for patch and diff files.
## Original author: Mike Frysinger
## License: GPL version 3 or newer
syntax patch "\.(patch|diff|debdiff|rej)$"
magic "diff output"
# There is no official support for comments in patch files.
comment ""
# Added lines.
color brightgreen "^\+.*"
# Show trailing whitespace only on added lines.
color ,green "[[:space:]]+$"
# Context lines.
color brightblue "^ .*"
# Deleted lines.
color brightred "^-.*"
# Header lines.
color magenta "^(Index:|diff)[[:blank:]].*"
# File names and dates.
color red "^---.*"
color green "^\+\+\+.*"
# Line numbers.
color brightyellow "^@@.*"
# Statistics.
color cyan start="^---$" end="^$"