Skip to content

Instantly share code, notes, and snippets.

@PowerKiKi
Created December 20, 2017 16:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save PowerKiKi/eee7387b10ce2785750b7b6edb458afd to your computer and use it in GitHub Desktop.
Save PowerKiKi/eee7387b10ce2785750b7b6edb458afd to your computer and use it in GitHub Desktop.
Nano configuration for git commit message (~/.nanorc)
syntax "gitcommit" "COMMIT_EDITMSG$"
color white "#.*"
color green "#.(new file|modified|deleted|renamed).*"
color yellow start="# Changes.*" end="# Changed.*"
color cyan start="# Untracked.*" end="diff"
color cyan start="# Untracked.*" end="$$"
color brightred "^deleted file mode .*"
color brightgreen "^\+.*"
color brightred "^-.*"
color brightyellow "^(diff|index|---|\+\+\+).*"
color brightmagenta "@@.*@@"
color white "# (Change[ds]|Untracked) .*"
color white "#.*\(use .*"
color white "^#"
# overlong lines which are not comments
color brightred "^[^#].{80,}.+$"
# issue number with optionnal closing keyword: https://help.github.com/articles/closing-issues-using-keywords/
icolor yellow "((close|closes|closed|fix|fixes|fixed|resolve|resolves|resolved) )?#[1234567890]+"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment