Skip to content

Instantly share code, notes, and snippets.

View dos1's full-sized avatar

Sebastian Krzyszkowiak dos1

View GitHub Profile
@keithamus
keithamus / Nano Git Commit Syntax highlighting
Created December 10, 2010 13:58
Add this to your ~/.nanorc and when running "git commit" (if your editor is nano) you'll have syntax highlighting in your commit message. Includes support for "git commit -v" too!
syntax "gitcommit" "COMMIT_EDITMSG$"
color white "#.*"
color green "#.(modified|deleted).*"
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|---|\+\+\+).*"