Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in .nano/nanorc.nanorc on line 26: Color 'normal' takes no prefix #375

Open
demosdemon opened this issue Jun 22, 2021 · 4 comments
Open

Comments

@demosdemon
Copy link
Contributor

change in nano: https://git.savannah.gnu.org/cgit/nano.git/commit/src/rcfile.c?id=e0442849988444065145449c90861172c6aba302

@karlbateman
Copy link

karlbateman commented Jul 25, 2021

I've successfully supressed the error with the following patch:

diff --git a/nanorc.nanorc b/nanorc.nanorc
index dd889fd..a1a9ec3 100644
--- a/nanorc.nanorc
+++ b/nanorc.nanorc
@@ -14,7 +14,6 @@ icolor blue " blue"
 icolor magenta " magenta"
 icolor cyan " cyan"
 icolor white " white"
-icolor normal " normal"
 icolor brightblack " brightblack"
 icolor brightred " brightred"
 icolor brightgreen " brightgreen"
@@ -23,7 +22,6 @@ icolor brightblue " brightblue"
 icolor brightmagenta " brightmagenta"
 icolor brightcyan " brightcyan"
 icolor brightwhite " brightwhite"
-icolor brightnormal " brightnormal"
 icolor ,black ",black "
 icolor ,red ",red "
 icolor ,green ",green "
@@ -32,7 +30,6 @@ icolor ,blue ",blue "
 icolor ,magenta ",magenta "
 icolor ,cyan ",cyan "
 icolor ,white ",white "
-icolor ,normal ",normal"
 icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
 icolor yellow "^[[:space:]]*(set|unset)[[:space:]]+(errorcolor|functioncolor|keycolor|numbercolor|selectedcolor|statuscolor|stripecolor|titlecolor)[[:space:]]+(bright)?(white|black|red|blue|green|yellow|magenta|cyan|normal)?(,(white|black|red|blue|green|yellow|magenta|cyan|normal))?\>"

@ritu1337
Copy link

in ~/.nano/nanorc.nanorc comment out color brightnormal " brightnormal"

galenguyer added a commit to galenguyer/nano-syntax-highlighting that referenced this issue Nov 2, 2022
galenguyer added a commit to galenguyer/nano-syntax-highlighting that referenced this issue Nov 2, 2022
galenguyer added a commit to galenguyer/nano-syntax-highlighting that referenced this issue Nov 2, 2022
galenguyer added a commit to galenguyer/nano-syntax-highlighting that referenced this issue Nov 2, 2022
@BackMountainDevil
Copy link

Error info

$ nano ~/.nanorc 
Error in /usr/share/nano-syntax-highlighting/nanorc.nanorc on line 26: Color 'normal' takes no prefix

file

~/.nanorc

set tabsize 4
set tabstospaces
#set linenumbers
include /usr/share/nano-syntax-highlighting/*.nanorc

/usr/share/nano-syntax-highlighting/nanorc.nanorc

## Here is an example for nanorc files.
##
syntax "Nanorc" "\.?nanorc$"
comment "#"

## Possible errors and parameters
icolor brightred "^[[:space:]]*((un)?set|include|syntax|i?color).*$"
## Colors
icolor black " black"
icolor red " red"
icolor green " green"
icolor yellow " yellow"
icolor blue " blue"
icolor magenta " magenta"
icolor cyan " cyan"
icolor white " white"
icolor normal " normal"
icolor brightblack " brightblack"
icolor brightred " brightred"
icolor brightgreen " brightgreen"
icolor brightyellow " brightyellow"
icolor brightblue " brightblue"
icolor brightmagenta " brightmagenta"
icolor brightcyan " brightcyan"
icolor brightwhite " brightwhite"
icolor brightnormal " brightnormal"
icolor ,black ",black "
icolor ,red ",red "
icolor ,green ",green "
icolor ,yellow ",yellow "
icolor ,blue ",blue "
icolor ,magenta ",magenta "
icolor ,cyan ",cyan "
icolor ,white ",white "
icolor ,normal ",normal"
icolor magenta "^[[:space:]]*i?color\>" "\<(start|end)="
icolor yellow "^[[:space:]]*(set|unset)[[:space:]]+(errorcolor|functioncolor|keycolor|numbercolor|selectedcolor|statuscolor|stripecolor|titlecolor)[[:space:]]+(bright)?(white|blac>

## Keywords
icolor brightgreen "^[[:space:]]*(set|unset)[[:space:]]+(afterends|allow_insecure_backup|atblanks|autoindent|backup|backupdir|boldtext|brackets|breaklonglines|casesensitive|consta>
icolor green "^[[:space:]]*(bind|set|unset|syntax|header|include|magic)\>"
## Strings
icolor white ""(\\.|[^"])*""
## Comments
icolor brightblue "^[[:space:]]*#.*$"
icolor cyan "^[[:space:]]*##.*$"

## Trailing whitespace
icolor ,green "[[:space:]]+$"

@davidhcefx
Copy link
Contributor

davidhcefx commented Feb 3, 2024

Hey guys, please also try out galenguyer/nano-syntax-highlighting. It already fixed this issue in: galenguyer@9d65eb4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants