View previous topic :: View next topic |
Author |
Message |
meowsqueak Veteran
Joined: 26 Aug 2003 Posts: 1549 Location: New Zealand
|
Posted: Tue Feb 14, 2006 1:36 am Post subject: nano default syntax highlighting/colouring behaviour broken? |
|
|
I'm not understanding something here...
nano-1.3.9
If I have this in my ~/.nanorc:
Code: | syntax "default"
color red "^[ \t]*#.*" |
then 'generic' (i.e. no extension) text files seem to have some sort of weird syntax colouring, where words like 'if' and 'time' are green as is '=', and 'cp' is blue. Most other words are plain (white). No, this isn't a shell script I'm looking at, and nothing is red either.
My /etc/nanorc has nothing except an ebuild rule enabled.
If I comment out that bit above, the file is completely plain text as I'd expect.
There are no other rules that apply - if there were, then commenting out the default section wouldn't change the situation.
I tried a file with just this in it:
Well, that triggers this strange behaviour too! It's almost as if the default behaviour is hard-coded and although it's enabled by the syntax "default" line, it's ignoring the subsequent directives.
That pattern used to make # comments in generic files red, but this seems totally broken now.
keywords: nano syntax color colour highlight default nanorc |
|
Back to top |
|
|
bensberg n00b
Joined: 09 Mar 2005 Posts: 36
|
Posted: Fri May 26, 2006 12:30 pm Post subject: Re: nano default syntax highlighting/colouring behaviour bro |
|
|
meowsqueak wrote: | Code: | syntax "default"
color red "^[ \t]*#.*" |
That pattern used to make # comments in generic files red, but this seems totally broken now. |
It should be fixed when 1.3.12 comes out. Meanwhile, have you tried this instead:
Code: | syntax "default"
color red "^[[:space:]]*#.*$" |
Myself I use:
Code: | syntax "default"
color red "^.+$"
color blue "^[[:space:]]*#.*$" |
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|