From 391ed68163390545b73c143b16ca172e107bc07c Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Wed, 18 Dec 2019 09:34:49 -0500 Subject: [PATCH 1/3] * Syntax Files: Detect more files for highlighting --- fish.nanorc | 1 + html.nanorc | 2 +- sh.nanorc | 4 ++-- twig.nanorc | 1 + xml.nanorc | 2 +- 5 files changed, 6 insertions(+), 4 deletions(-) create mode 120000 twig.nanorc diff --git a/fish.nanorc b/fish.nanorc index 85fa258..081ee9a 100644 --- a/fish.nanorc +++ b/fish.nanorc @@ -1,6 +1,7 @@ ## Here is an example for Fish shell scripts. ## syntax "Fish" "\.fish$" +header "^#!.*/(env +)?fish( |$)" 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 "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" diff --git a/html.nanorc b/html.nanorc index 4f225d8..77a04dd 100644 --- a/html.nanorc +++ b/html.nanorc @@ -1,6 +1,6 @@ ## HTML syntax highlighting rules for Nano -syntax "HTML" "\.html?(.j2)?$" +syntax "HTML" "\.html?(.j2)?(.twig)?$" magic "HTML document" comment "" diff --git a/sh.nanorc b/sh.nanorc index 4eeb07d..0fe1cb2 100644 --- a/sh.nanorc +++ b/sh.nanorc @@ -1,7 +1,7 @@ ## Here is an example for Bourne shell scripts. ## -syntax "SH" "\.sh$" "\.bashrc" "bashrc" "\.bash_aliases" "bash_aliases" "\.bash_functions" "bash_functions" "\.bash_login" "\.bash_logout" "\.bash_profile" "bash_profile" "\.profile" "revise\..+$" -header "^#!.*/(env +)?(ba)?sh( |$)" +syntax "SH" "\.sh$" "\.ash" "\.bashrc" "bashrc" "\.bash_aliases" "bash_aliases" "\.bash_functions" "bash_functions" "\.bash_login" "\.bash_logout" "\.bash_profile" "bash_profile" "\.profile" "revise\..+$" +header "^#!.*/(env +)?(ba|da|a)?sh( |$)" ## keywords: color green "\<(case|do|done|elif|else|esac|fi|for|function|if|in|select|then|time|until|while)\>" color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" diff --git a/twig.nanorc b/twig.nanorc new file mode 120000 index 0000000..c18f7cb --- /dev/null +++ b/twig.nanorc @@ -0,0 +1 @@ +html.nanorc \ No newline at end of file diff --git a/xml.nanorc b/xml.nanorc index 8ad5a32..005032a 100644 --- a/xml.nanorc +++ b/xml.nanorc @@ -1,7 +1,7 @@ ## Here is an example for xml files. ## -syntax "XML" ".*\.([jrs]?html?|xml|sgml?|rng)$" +syntax "XML" ".*\.([jrs]?html?|xml|sgml?|rng|mei|musicxml)$" color white "^.+$" color green start="<" end=">" color cyan "<[^> ]+" From 021cd029637a438c7d5f6aabdcfb9db8eae75f37 Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Wed, 18 Dec 2019 09:41:41 -0500 Subject: [PATCH 2/3] * CSS Syntax highlighting: highlight .less files --- css.nanorc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/css.nanorc b/css.nanorc index 3e6b83c..04d4a97 100644 --- a/css.nanorc +++ b/css.nanorc @@ -1,7 +1,7 @@ ## Here is an example for css files. ## -syntax "CSS" "\.(css|scss)$" +syntax "CSS" "\.(css|scss|less)$" color brightred "." color brightyellow start="\{" end="\}" color brightwhite start=":" end="[;^\{]" From aaee778ba512f078cea4b003898144ed45ef8e3c Mon Sep 17 00:00:00 2001 From: Zach DeCook Date: Wed, 18 Dec 2019 22:08:43 -0500 Subject: [PATCH 3/3] - syntax: Add a few more file endings --- c.nanorc | 2 +- xml.nanorc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/c.nanorc b/c.nanorc index 22ffea6..5a521d3 100644 --- a/c.nanorc +++ b/c.nanorc @@ -1,6 +1,6 @@ ## Here is an example for C/C++. ## -syntax "C" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$" +syntax "C" "\.(c(c|pp|xx)?|C)$" "\.(h(h|pp|xx)?|H)$" "\.ii?$" "\.(def)$" "\.ino" magic "^(C|C\+\+) (source|program)" comment "//" color brightred "\<[A-Z_][0-9A-Z_]+\>" diff --git a/xml.nanorc b/xml.nanorc index 710e166..809a048 100644 --- a/xml.nanorc +++ b/xml.nanorc @@ -1,7 +1,7 @@ ## Here is an example for xml files. ## -syntax "XML" ".*\.([jrs]?html?|xml|sgml?|rng|mei|musicxml)$" +syntax "XML" ".*\.([jrs]?html?|xml|sgml?|rng|vue|mei|musicxml)$" header "<\?xml.*version=.*\?>" magic "(XML|SGML) (sub)?document" comment ""