summaryrefslogtreecommitdiff
path: root/doc/syntax/patch.nanorc
diff options
context:
space:
mode:
Diffstat (limited to 'doc/syntax/patch.nanorc')
-rw-r--r--doc/syntax/patch.nanorc15
1 files changed, 13 insertions, 2 deletions
diff --git a/doc/syntax/patch.nanorc b/doc/syntax/patch.nanorc
index a788b35..f5c1dd5 100644
--- a/doc/syntax/patch.nanorc
+++ b/doc/syntax/patch.nanorc
@@ -1,10 +1,21 @@
## Here is an example for patch files.
-##
+
syntax "patch" "\.(patch|diff)$"
+magic "diff output text"
+
+# Added lines.
color brightgreen "^\+.*"
-color green "^\+\+\+.*"
+# Show trailing whitespace only on added lines.
+color ,green "[[:space:]]+$"
+# Context lines.
color brightblue "^ .*"
+# Deleted lines.
color brightred "^-.*"
+
+# File names and dates.
color red "^---.*"
+color green "^\+\+\+.*"
+# Line numbers.
color brightyellow "^@@.*"
+# Header lines.
color magenta "^diff.*"