nanorc/gitcommit.nanorc
2018-08-09 10:09:19 +02:00

81 lines
2.1 KiB
Plaintext

syntax "git-config" "git(config|modules)$|\.git/config$"
color cyan "\<(true|false)\>"
color cyan "^[[:space:]]*[^=]*="
color magenta "^[[:space:]]*\[.*\]$"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color black "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
# This code is free software; you can redistribute it and/or modify it under
# the terms of the new BSD License.
#
# Copyright (c) 2010, Sebastian Staudt
# A nano configuration file to enable syntax highlighting of some Git specific
# files with the GNU nano text editor (http://www.nano-editor.org)
#
syntax "git-commit" "COMMIT_EDITMSG|TAG_EDITMSG"
# Commit message
color yellow ".*"
# Comments
color black "^#.*"
# Files changes
color white "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
color red "#[[:space:]]deleted:"
color green "#[[:space:]]modified:"
color green "#[[:space:]]new file:"
color blue "#[[:space:]]renamed:"
# Untracked filenames
color black "^# [^/?*:;{}\\]+\.[^/?*:;{}\\]+$"
color magenta "^#[[:space:]]Changes.*[:]"
color red "^#[[:space:]]Your branch and '[^']+"
color black "^#[[:space:]]Your branch and '"
color white "^#[[:space:]]On branch [^ ]+"
color black "^#[[:space:]]On branch"
# Recolor hash symbols
# Recolor hash symbols
color black "#"
# Trailing spaces (+LINT is not ok, git uses tabs)
color ,green "[[:space:]]+$"
# This syntax format is used for interactive rebasing
syntax "git-rebase-todo" "git-rebase-todo"
# Default
color yellow ".*"
# Comments
color black "^#.*"
# Rebase commands
color green "^(e|edit) [0-9a-f]{7,40}"
color green "^# (e, edit)"
color green "^(f|fixup) [0-9a-f]{7,40}"
color green "^# (f, fixup)"
color white "^(p|pick) [0-9a-f]{7,40}"
color white "^# (p, pick)"
color blue "^(r|reword) [0-9a-f]{7,40}"
color blue "^# (r, reword)"
color red "^(s|squash) [0-9a-f]{7,40}"
color red "^# (s, squash)"
color yellow "^(x|exec) [^ ]+ [0-9a-f]{7,40}"
color yellow "^# (x, exec)"
# Recolor hash symbols
color black "#"
# Commit IDs
color blue "[0-9a-f]{7,40}"