2020-04-20 20:15:43 +03:00
|
|
|
## Syntax highlighting for patch and diff files.
|
2014-05-16 15:08:52 +04:00
|
|
|
|
2018-02-07 13:25:46 +03:00
|
|
|
syntax patch "\.(patch|diff|debdiff)$"
|
2017-11-19 13:10:53 +03:00
|
|
|
magic "diff output"
|
2016-05-25 23:13:50 +03:00
|
|
|
# There is no official support for comments in patch files.
|
|
|
|
comment ""
|
2014-05-16 15:08:52 +04:00
|
|
|
|
|
|
|
# Added lines.
|
2006-06-01 21:23:28 +04:00
|
|
|
color brightgreen "^\+.*"
|
2014-05-16 15:08:52 +04:00
|
|
|
# Show trailing whitespace only on added lines.
|
|
|
|
color ,green "[[:space:]]+$"
|
|
|
|
# Context lines.
|
2006-06-01 21:23:28 +04:00
|
|
|
color brightblue "^ .*"
|
2014-05-16 15:08:52 +04:00
|
|
|
# Deleted lines.
|
2006-06-01 21:23:28 +04:00
|
|
|
color brightred "^-.*"
|
2014-05-16 15:08:52 +04:00
|
|
|
|
2016-12-10 19:46:10 +03:00
|
|
|
# Header lines.
|
|
|
|
color magenta "^(Index:|diff)[[:blank:]].*"
|
2014-05-16 15:08:52 +04:00
|
|
|
# File names and dates.
|
2006-06-01 21:23:28 +04:00
|
|
|
color red "^---.*"
|
2014-05-16 15:08:52 +04:00
|
|
|
color green "^\+\+\+.*"
|
|
|
|
# Line numbers.
|
2006-06-01 21:23:28 +04:00
|
|
|
color brightyellow "^@@.*"
|
2016-12-10 19:46:10 +03:00
|
|
|
|
|
|
|
# Statistics.
|
|
|
|
color cyan start="^---$" end="^$"
|