Forked from keithamus/Nano Git Commit Syntax highlighting
Last active
April 28, 2021 08:51
-
-
Save ob-ivan/4470622183396c819251380a864c7309 to your computer and use it in GitHub Desktop.
Include this file from 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 cyan "#.*" | |
color brightgreen "# On branch .*" | |
color cyan "# On branch" | |
color green "#.(new file|modified|deleted).*" | |
color yellow start="# Changes.*" end="# Changed.*" | |
color red start="# Untracked.*" end="diff" | |
color red start="# Untracked.*" end="$$" | |
color brightred "^deleted file mode .*" | |
color brightgreen "^new file mode .*" | |
color red "^-.*" | |
color green "^\+.*" | |
color brightyellow "^(diff|index|---|\+\+\+).*" | |
color brightmagenta "@@.*@@" | |
color cyan "# (Change[ds]|Untracked) .*" | |
color cyan "#.*\(use .*" | |
color brightcyan "# -* >8 -*" | |
color cyan "^#" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment