Skip to content

Instantly share code, notes, and snippets.

@furkanmustafa
Created July 28, 2015 23:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save furkanmustafa/be7168f07f8b0ddc771b to your computer and use it in GitHub Desktop.
Save furkanmustafa/be7168f07f8b0ddc771b to your computer and use it in GitHub Desktop.
Git Commit nanorc file with diff/patch support
# Some parts from here : http://milianw.de/code-snippets/git-commit-message-highlighting-in-nano
# Some parts from here : https://github.com/serialhex/nano-highlight/blob/master/patch.nanorc
# syntax highlighting for git commit messages
syntax "patch" ".git/COMMIT_EDITMSG$"
# overlong lines
# color brightred "^.{70,}.+$"
# comment
color blue "^#.*$"
# special comment lines
color green "^# Changes to be committed:"
color red "^# Changes not staged for commit:"
color brightblue "^# Untracked files:"
color brightblue "^# On branch .+$"
color brightblue "^# Your branch is ahead of .+$"
# diff files
color cyan "^#[^ a-zA-Z0-9][^ ].*$"
color brightgreen "^\+.*"
color green "^\+\+\+.*"
color brightred "^-.*"
color red "^---.*"
color brightyellow "^@@.*"
color magenta "^diff.*"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment