Created
December 10, 2010 13:58
-
-
Save keithamus/736220 to your computer and use it in GitHub Desktop.
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!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 "^#" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great highlighting! My life has just become so much better!
Some ideas to add to this:
.config/nano/gitcommit.nanorc
) and then reference to it from your.nanorc
with aninclude
line as described here: http://milianw.de/code-snippets/git-commit-message-highlighting-in-nanocyan
for the comments.---- >8 ----
.