Skip to content

Commit

Permalink
Change tab coloring behavior for several rc's
Browse files Browse the repository at this point in the history
The commit mariuszs/nanorc@e5cc8be
introduced a number of rc files that cause tabs to always show as red
(even with trailing spaces). Adjust the behavior according to changes in
https://github.com/nanorc/nanorc/blob/master/mixins/lint.nanorc, which
seems to be an updated source of the original commit. Make tabs appear
green without trailing characters, red with trailing spaces, and
uncolored when followed by any other character.
  • Loading branch information
jodizzle committed Oct 24, 2015
1 parent cf16158 commit b64de43
Show file tree
Hide file tree
Showing 27 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion awk.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ color magenta "\\."
color brightblack "(^|[[:space:]])#([^{].*)?$"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion coffeescript.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ color brightyellow "@[A-Za-z0-9_]*"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion csharp.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion glsl.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion go.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion ini.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ color red "[=;]"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion inputrc.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\.?"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion javascript.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ color brightblack "/\*.+\*/"
color brightwhite,cyan "TODO:?"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion json.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightyellow "\"(\\"|[^"])*\"[[:space:]]*:" "'(\'|[^'])*'[[:space:]]*:"
color magenta "\\u[0-9a-fA-F]{4}|\\[bfnrt'"/\\]"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion keymap.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ color red "="
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "^!.*$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion kickstart.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ color red "^-[a-zA-Z0-9*-]+"

color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion lisp.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ color magenta "'[A-Za-z][A-Za-z0-9_-]+"
color magenta "\\.?"
color brightblack "(^|[[:space:]]);.*"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion mpdconf.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ color brightmagenta "^(input|audio_output|decoder)[[:space:]]*\{|\}"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion nginx.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color yellow start="'$" end="';$"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion peg.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])\-\-.*$"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion pkg-config.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ color cyan "^(Requires|Libs)(\.private)?:"
color red "="
color brightyellow "\$\{[A-Za-z_][A-Za-z0-9_]*\}"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion po.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color magenta "\\.?"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
6 changes: 3 additions & 3 deletions privoxy.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ syntax "privoxy-config" "privoxy/config$"
color cyan "(accept-intercepted-requests|actionsfile|admin-address|allow-cgi-request-crunching|buffer-limit|compression-level|confdir|connection-sharing|debug|default-server-timeout|deny-access|enable-compression|enable-edit-actions|enable-remote-http-toggle|enable-remote-toggle|enforce-blocks|filterfile|forward|forwarded-connect-retries|forward-socks4|forward-socks4a|forward-socks5|handle-as-empty-doc-returns-ok|hostname|keep-alive-timeout|listen-address|logdir|logfile|max-client-connections|permit-access|proxy-info-url|single-threaded|socket-timeout|split-large-forms|templdir|toggle|tolerate-pipelining|trustfile|trust-info-url|user-manual)[[:space:]]"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"

syntax "privoxy-action" "\.action$"

Expand All @@ -16,7 +16,7 @@ color black "[{}]"
color magenta "\\.?"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"

syntax "privoxy-filter" "\.filter$"

Expand All @@ -25,5 +25,5 @@ color brightblue "^(FILTER|CLIENT-HEADER-FILTER|CLIENT-HEADER-TAGGER|SERVER-HEAD
color magenta "\\.?"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"

2 changes: 1 addition & 1 deletion rpmspec.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ color brightmagenta "^%(trigger|triggerin|triggerpostun|triggerun|verifyscript)
color brightblack "(^|[[:space:]])#([^{].*)?$"
color blue "^\*.*$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
color brightwhite,cyan "TODO:?"
2 changes: 1 addition & 1 deletion sed.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ color brightyellow "\{[0-9]+,?[0-9]*\}"
color magenta "\\."
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion sql.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color yellow "`(\\.|[^\\`])*`"
color brightblack "\-\-.*$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion systemd.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ color brightyellow "\$MAINPID"
color brightcyan "\<(true|false)\>"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion vala.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ color brightblack "(^|[[:space:]])//.*"
color brightblack start="/\*" end="\*/"
color brightwhite,cyan "TODO:?"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion vi.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ color red "[!&=]"
color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])\"[^"]*$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion xresources.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ color red "[*:=]"
color brightcyan "\<(true|false)\>"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion yaml.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ color yellow ""(\\.|[^"])*"|'(\\.|[^'])*'"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color brightmagenta "^---" "^\.\.\." "^%YAML" "^%TAG"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"
2 changes: 1 addition & 1 deletion yum.nanorc
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ color brightmagenta "^[[:space:]]*\[.*\]$"
color brightyellow "\$(releasever|arch|basearch|uuid|YUM[0-9])"
color brightblack "(^|[[:space:]])#([^{].*)?$"
color ,green "[[:space:]]+$"
color ,red " +"
color ,red " + +| + +"

0 comments on commit b64de43

Please sign in to comment.