mirror of
https://github.com/scopatz/nanorc
synced 2024-11-24 01:25:39 +01:00
Merge pull request #10 from mariuszs/master
New highlight for nano, fixed git commit highlight
This commit is contained in:
commit
dfe06c324c
15
fish.nanorc
Normal file
15
fish.nanorc
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
## Here is an example for Fish shell scripts.
|
||||||
|
##
|
||||||
|
syntax "fish" "\.fish$"
|
||||||
|
magic "(Fish.*) shell script text"
|
||||||
|
icolor brightgreen "^[0-9A-Z_]+\(\)"
|
||||||
|
color green "\<(alias|begin|break|case|continue|contains|else|end|for|function|if|math|return|set|switch|test|while)\>"
|
||||||
|
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
|
||||||
|
color green "\<(and|isatty|not|or|in)\>"
|
||||||
|
color yellow "--[a-z-]+"
|
||||||
|
color brightmagenta "\ -[a-z]+"
|
||||||
|
color brightblue "\<(bg|bind|block|breakpoint|builtin|cd|command|commandline|complete|dirh|dirs|echo|emit|eval|exec|exit|fg|fish|fish_config|fish_ident|fish_pager|fish_prompt|fish_right_prompt|fish_update_completions|fishd|funced|funcsave|functions|help|history|jobs|mimedb|nextd|open|popd|prevd|psub|pushd|pwd|random|read|set_color|status|trap|type|ulimit|umask|vared)\>"
|
||||||
|
icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
|
||||||
|
color cyan "(^|[[:space:]])#.*$"
|
||||||
|
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
|
||||||
|
color ,green "[[:space:]]+$"
|
64
git.nanorc
Normal file
64
git.nanorc
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# 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)
|
||||||
|
#
|
||||||
|
# Save this file to a directory of your choice and add it to your nanorc using
|
||||||
|
# include ${PATH_TO_THE_FILE}/git.nanorc
|
||||||
|
|
||||||
|
# This syntax format is used for editing commit and tag messages
|
||||||
|
syntax "git commit/tag messages" "COMMIT_EDITMSG|TAG_EDITMSG"
|
||||||
|
|
||||||
|
# Commit message
|
||||||
|
color white ".*"
|
||||||
|
|
||||||
|
# Subject line (This is pretty weird, but it works at least for OS X' nano 2.0.6)
|
||||||
|
# color brightcyan start="^" end="$"
|
||||||
|
|
||||||
|
# Comments
|
||||||
|
color brightblack "^#.*"
|
||||||
|
|
||||||
|
# Files changes
|
||||||
|
color white "#[[:space:]](deleted|modified|new file|renamed):[[:space:]].*"
|
||||||
|
color red "#[[:space:]]deleted:"
|
||||||
|
color green "#[[:space:]]modified:"
|
||||||
|
color brightgreen "#[[:space:]]new file:"
|
||||||
|
color brightblue "#[[:space:]]renamed:"
|
||||||
|
|
||||||
|
# Recolor hash symbols
|
||||||
|
color brightblack "#"
|
||||||
|
|
||||||
|
# Trailing spaces
|
||||||
|
color ,red "[[:space:]]+$"
|
||||||
|
|
||||||
|
# This syntax format is used for interactive rebasing
|
||||||
|
syntax "git rebase todo" "git-rebase-todo"
|
||||||
|
|
||||||
|
# Default
|
||||||
|
color white ".*"
|
||||||
|
|
||||||
|
# Comments
|
||||||
|
color brightblack "^#.*"
|
||||||
|
|
||||||
|
# Commit IDs
|
||||||
|
color brightwhite "[0-9a-f]{7,40}"
|
||||||
|
|
||||||
|
# Rebase commands
|
||||||
|
color green "^(e|edit) [0-9a-f]{7,40}"
|
||||||
|
color green "^# (e, edit)"
|
||||||
|
color brightgreen "^(f|fixup) [0-9a-f]{7,40}"
|
||||||
|
color brightgreen "^# (f, fixup)"
|
||||||
|
color brightwhite "^(p|pick) [0-9a-f]{7,40}"
|
||||||
|
color brightwhite "^# (p, pick)"
|
||||||
|
color blue "^(r|reword) [0-9a-f]{7,40}"
|
||||||
|
color blue "^# (r, reword)"
|
||||||
|
color brightred "^(s|squash) [0-9a-f]{7,40}"
|
||||||
|
color brightred "^# (s, squash)"
|
||||||
|
color yellow "^(x|exec) [^ ]+ [0-9a-f]{7,40}"
|
||||||
|
color yellow "^# (x <cmd>, exec <cmd>)"
|
||||||
|
|
||||||
|
# Recolor hash symbols
|
||||||
|
color brightblack "#"
|
@ -1,14 +0,0 @@
|
|||||||
syntax "gitcommit" "COMMIT_EDITMSG$"
|
|
||||||
color white "#.*"
|
|
||||||
color green "#.(modified|deleted).*"
|
|
||||||
color yellow start="# Changes.*" end="# Changed.*"
|
|
||||||
color cyan start="# Untracked.*" end="diff"
|
|
||||||
color cyan start="# Untracked.*" end="$$"
|
|
||||||
color brightred "^deleted file mode .*"
|
|
||||||
color brightgreen "^\+.*"
|
|
||||||
color brightred "^-.*"
|
|
||||||
color brightyellow "^(diff|index|---|\+\+\+).*"
|
|
||||||
color brightmagenta "@@.*@@"
|
|
||||||
color white "# (Change[ds]|Untracked) .*"
|
|
||||||
color white "#.*\(use .*"
|
|
||||||
color white "^#"
|
|
Loading…
Reference in New Issue
Block a user