mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-22 12:51:23 +03:00
05602e29cd
The addition was inspired by `davidhcefx`.
27 lines
604 B
Plaintext
27 lines
604 B
Plaintext
## Syntax highlighting for patch and diff files.
|
|
|
|
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="^$"
|