summaryrefslogtreecommitdiff
path: root/doc/syntax/patch.nanorc
blob: f5c1dd597c330d7da089b3f9d06d0b1f99312dfc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
## Here is an example for patch files.

syntax "patch" "\.(patch|diff)$"
magic "diff output text"

# Added lines.
color brightgreen "^\+.*"
# 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.*"