From 31eef3d8cb9c0e6ca2f3ba5e545f8e5730271dcc Mon Sep 17 00:00:00 2001 From: Tiago Almeida Date: Thu, 3 Oct 2019 23:06:15 +0100 Subject: [PATCH] More changes... --- install.sh | 3 +- themes/custom | 41 -------------------------- themes/{original => highlight/nano} | 0 themes/highlight/scopatz | 45 +++++++++++++++++++++++++++++ themes/highlight/tpro | 43 +++++++++++++++++++++++++++ themes/project | 41 -------------------------- todo.md | 4 ++- 7 files changed, 93 insertions(+), 84 deletions(-) delete mode 100755 themes/custom rename themes/{original => highlight/nano} (100%) create mode 100755 themes/highlight/scopatz create mode 100755 themes/highlight/tpro delete mode 100755 themes/project diff --git a/install.sh b/install.sh index c26cc80..a48dd01 100755 --- a/install.sh +++ b/install.sh @@ -1,4 +1,5 @@ #!/bin/sh +# NANO HIGHLIGHT INSTALLATION # check for unzip before we continue if [ ! "$(command -v unzip)" ]; then @@ -19,7 +20,7 @@ _fetch_sources(){ _update_nanorc(){ touch ~/.nanorc - + # add all includes from ~/.nano/nanorc if they're not already there while read -r inc; do if ! grep -q "$inc" "${NANORC_FILE}"; then diff --git a/themes/custom b/themes/custom deleted file mode 100755 index 176e61f..0000000 --- a/themes/custom +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/sed -f - -# CUSTOM -## Highlight, GUI and shortcuts.. - -# GUI Colors -## No GUI colors available, yet... - - -# Text Colors - -s|COMMENT1|brightblue| -s|COMMENT2|cyan| -s|ERROR|brightred| -s|KEYWORD1|brightgreen| -s|KEYWORD2|green| -s|COLOR|yellow| -s|STRING|brightmagenta| -s|TSPACE|,green| - -# Macros - -#s|^PLAIN:|color black| -#s|^TYPE:|color brightgreen| -#s|^STRING:|color yellow| -#s|^NUMBER:|color blue| -#s|^BOOLEAN:|color brightmagenta| -#s|^REGEXP:|color brightcyan| -#s|^VARIABLE:|color brightyellow| -#s|^OPERATOR:|color red| -#s|^KEYWORD:|color green| -#s|^~KEYWORD:|icolor green| -#s|^FUNCTION:|color brightblue| -#s|^ESCAPE:|color magenta| -#s|^COMMENT:|color cyan| -#s|^ENABLED:|color brightgreen| -#s|^DISABLED:|color brightred| -#s|^WARNING:|color ,red| -#s|^+TODO|color brightcyan "TODO:?"| -#s|^+LINT|color ,green "[[:space:]]+$"\ncolor ,red "\t*"| -#s|^+LONG-LINE-WARNING|color ,red "^.{81,}$"| diff --git a/themes/original b/themes/highlight/nano similarity index 100% rename from themes/original rename to themes/highlight/nano diff --git a/themes/highlight/scopatz b/themes/highlight/scopatz new file mode 100755 index 0000000..d527c5e --- /dev/null +++ b/themes/highlight/scopatz @@ -0,0 +1,45 @@ +#!/usr/bin/sed -f + +# PROJECT +## Our approach to nano's highlight. + +# GUI Colors +## No GUI colors available, yet... + + +# Text Colors +## Strings and Comments: +## In general you will want your strings and comments to come last, +## because highlighting rules are applied in the order they are read in. +## The words should be in singular. +## BTICKS = backtick +## TSPACE = trailing whitespace +## VERSION = version numbers +## REMINDERS = fixme, todo, xxx + +s|CONSTANT|brightred| +s|FUNCTION|brightmagenta| +s|KEYWORD1|brightgreen| +s|KEYWORD2|green| +s|DIRECTIVE|brightcyan| +s|STRING1|red| +s|STRING2|magenta| +s|COMMENT1|brightblue| +s|COMMENT2|cyan| +s|COLOR|yellow| +s|MACRO|cyan| +s|ERROR|brightred| +s|OPERATORS|green| +s|BOOLEAN|brightmagenta| +s|BRACKET|magenta| +s|BTICKS|green| +s|TSPACE|,green| +s|VERSION|red| +s|REMINDERS|brightwhite,yellow| +s|EMAIL|magenta| + +# Macros + +#s|^+TODO|color brightcyan "TODO:?"| +#s|^+LINT|color ,green "[[:space:]]+$"\ncolor ,red "\t*"| +#s|^+LONG-LINE-WARNING|color ,red "^.{81,}$"| diff --git a/themes/highlight/tpro b/themes/highlight/tpro new file mode 100755 index 0000000..448eb77 --- /dev/null +++ b/themes/highlight/tpro @@ -0,0 +1,43 @@ +#!/usr/bin/sed -f + +# ORIGINAL +## Best approach to the original 'nanorc' files. +## If you want the original, uninstall these files, +## but you will lose many highlight instructions... + +# GUI Colors +## No GUI colors in original ... + +# Text Colors +## Strings and Comments: +## In general you will want your strings and comments to come last, +## because highlighting rules are applied in the order they are read in. +## The words should be in singular. +## BTICKS = backtick +## TSPACE = trailing whitespace +## VERSION = version numbers +## REMINDERS = fixme, todo, xxx + +s|CONSTANT|brightred| +s|FUNCTION|brightmagenta| +s|KEYWORD1|brightgreen| +s|KEYWORD2|green| +s|DIRECTIVE|brightcyan| +s|STRING1|red| +s|STRING2|magenta| +s|COMMENT1|brightblue| +s|COMMENT2|cyan| +s|COLOR|yellow| +s|MACRO|cyan| +s|ERROR|brightred| +s|OPERATORS|green| +s|BOOLEAN|brightmagenta| +s|BRACKET|magenta| +s|BTICKS|green| +s|TSPACE|,green| +s|VERSION|red| +s|REMINDERS|brightwhite,yellow| +s|EMAIL|magenta| + +# Macros +## No Macros in original ... diff --git a/themes/project b/themes/project deleted file mode 100755 index 2dda5ee..0000000 --- a/themes/project +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/sed -f - -# PROJECT -## Our approach to nano's highlight. - -# GUI Colors -## No GUI colors available, yet... - - -# Text Colors - -s|COMMENT1|brightblue| -s|COMMENT2|cyan| -s|ERROR|brightred| -s|KEYWORD1|brightgreen| -s|KEYWORD2|green| -s|COLOR|yellow| -s|STRING|brightmagenta| -s|TSPACE|,green| - -# Macros - -#s|^PLAIN:|color black| -#s|^TYPE:|color brightgreen| -#s|^STRING:|color yellow| -#s|^NUMBER:|color blue| -#s|^BOOLEAN:|color brightmagenta| -#s|^REGEXP:|color brightcyan| -#s|^VARIABLE:|color brightyellow| -#s|^OPERATOR:|color red| -#s|^KEYWORD:|color green| -#s|^~KEYWORD:|icolor green| -#s|^FUNCTION:|color brightblue| -#s|^ESCAPE:|color magenta| -#s|^COMMENT:|color cyan| -#s|^ENABLED:|color brightgreen| -#s|^DISABLED:|color brightred| -#s|^WARNING:|color ,red| -#s|^+TODO|color brightcyan "TODO:?"| -#s|^+LINT|color ,green "[[:space:]]+$"\ncolor ,red "\t*"| -#s|^+LONG-LINE-WARNING|color ,red "^.{81,}$"| diff --git a/todo.md b/todo.md index 97014ac..79b133a 100644 --- a/todo.md +++ b/todo.md @@ -1,6 +1,8 @@ # TODO +0. Create the other theme files accordingly the original. +0. The themes files is only for sed. +0. Make nanorc more beautiful. 1. Combine original files with project files. 2. See if there is any command to check the atual version of nano (to update the files BEFORE a release). -3. Put the nanorc files in a folder. 4. Make the install file the oficial installaton and update it accordingly.