-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommit.nanorc
More file actions
26 lines (20 loc) · 999 Bytes
/
Copy pathcommit.nanorc
File metadata and controls
26 lines (20 loc) · 999 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## syntax highlighting for git commit messages
## based on http://milianw.de/code-snippets/git-commit-message-highlighting-in-nano
syntax "patch" ".git/COMMIT_EDITMSG$"
# overlong lines
color brightred "^.{72,}.+$"
# KDE commit hook keywords, see: http://community.kde.org/Sysadmin/GitKdeOrgManual#Commit_hook_keywords
color yellow "^(Merge|Conflicts|Fixes|Implements|See|See also|This reverts)(:| (commit [0-9a-f]{5,}|((bug|task|issue|crash)( report)?|(feature|enhancement)( request)?) #[0-9]+))"
color green "((bug|task|issue|crash)( report)?|(feature|enhancement)( request)?) #[0-9]+"
color green "commit [0-9a-f]{5,}"
# comment
color blue "^#.*$"
# special comment lines
color green "^# Changes to be committed:"
color red "^# Changes not staged for commit:"
color brightblue "^# Untracked files:"
color brightblue "^# On branch .+$"
color brightblue "^# Your branch is ahead of .+$"
# diff files
# meh - cannot match against \t ... should be: ^#\t.*$
color cyan "^#[^ a-zA-Z0-9#][^ ].*$"