Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
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|---|\+\+\+).*"
color brightmagenta "@@.*@@"
color white "# (Change[ds]|Untracked) .*"
color white "#.*\(use .*"
color white "^#"

hraban commented Jan 6, 2016

great!! thanks man

Legend cheers mate

dacdave commented Dec 5, 2016

Will this work for .vimrc as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment