git.nanorc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. syntax "gitconfig" "git(config|modules)$|\.git/config$"
  2. color brightcyan "\<(true|false)\>"
  3. color cyan "^[[:space:]]*[^=]*="
  4. color brightmagenta "^[[:space:]]*\[.*\]$"
  5. color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
  6. color brightblack "(^|[[:space:]])#([^{].*)?$"
  7. color ,green "[[:space:]]+$"
  8. color ,red " +"
  9. # This code is free software; you can redistribute it and/or modify it under
  10. # the terms of the new BSD License.
  11. #
  12. # Copyright (c) 2010, Sebastian Staudt
  13. # A nano configuration file to enable syntax highlighting of some Git specific
  14. # files with the GNU nano text editor (http://www.nano-editor.org)
  15. #
  16. syntax "git commit/tag messages" "COMMIT_EDITMSG|TAG_EDITMSG"
  17. # Commit message
  18. color yellow ".*"
  19. # Comments
  20. color brightblack "^#.*"
  21. # Files changes
  22. color white "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
  23. color red "#[[:space:]]deleted:"
  24. color green "#[[:space:]]modified:"
  25. color brightgreen "#[[:space:]]new file:"
  26. color brightblue "#[[:space:]]renamed:"
  27. # Untracked filenames
  28. color black "^# [^/?*:;{}\\]+\.[^/?*:;{}\\]+$"
  29. color brightmagenta "^#[[:space:]]Changes.*[:]"
  30. color brightred "^#[[:space:]]Your branch and '[^']+"
  31. color brightblack "^#[[:space:]]Your branch and '"
  32. color brightwhite "^#[[:space:]]On branch [^ ]+"
  33. color brightblack "^#[[:space:]]On branch"
  34. # Recolor hash symbols
  35. # Recolor hash symbols
  36. color brightblack "#"
  37. # Trailing spaces (+LINT is not ok, git uses tabs)
  38. color ,red "[[:space:]]+$"
  39. # This syntax format is used for interactive rebasing
  40. syntax "git rebase todo" "git-rebase-todo"
  41. # Default
  42. color yellow ".*"
  43. # Comments
  44. color brightblack "^#.*"
  45. # Rebase commands
  46. color green "^(e|edit) [0-9a-f]{7,40}"
  47. color green "^# (e, edit)"
  48. color brightgreen "^(f|fixup) [0-9a-f]{7,40}"
  49. color brightgreen "^# (f, fixup)"
  50. color brightwhite "^(p|pick) [0-9a-f]{7,40}"
  51. color brightwhite "^# (p, pick)"
  52. color blue "^(r|reword) [0-9a-f]{7,40}"
  53. color blue "^# (r, reword)"
  54. color brightred "^(s|squash) [0-9a-f]{7,40}"
  55. color brightred "^# (s, squash)"
  56. color yellow "^(x|exec) [^ ]+ [0-9a-f]{7,40}"
  57. color yellow "^# (x, exec)"
  58. # Recolor hash symbols
  59. color brightblack "#"
  60. # Commit IDs
  61. color brightblue "[0-9a-f]{7,40}"