Skip to content

Instantly share code, notes, and snippets.

@fasaxc
Last active July 22, 2024 14:12
Show Gist options
  • Select an option

  • Save fasaxc/8ae0acaf06af6e3028955da0cbc52751 to your computer and use it in GitHub Desktop.

Select an option

Save fasaxc/8ae0acaf06af6e3028955da0cbc52751 to your computer and use it in GitHub Desktop.
nanorc snippet for git 50/72 commit message highlighting
# Syntax highlight for a git 50/72 commit message.
syntax "gitcommit" "COMMIT_EDITMSG$"
# Colour all lines as if they were the first.
color bold,black,red ".*"
color bold,black,orange "^.{,72}"
color bold,normal "^.{,50}"
# Use start="$" to colour everything after the first line.
color normal start="$" end=".{72}"
# Comments.
color cyan,black "#.*$"
comment "#"
@fasaxc
Copy link
Author

fasaxc commented Jul 22, 2024

image

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