Jump to content
Muxe Inc Forums
Sign in to follow this  
GPFault

Colors in editor

Recommended Posts

GPFault    0

Hi!

1. Beginning with build 2.15.7883 comments, keywords aren`t highlighted in current line if "Current line highlight" is on. I don`t know is this bug or feature, but if it`s new feature - imho it should be made optional...

 

2. There is an color option Editor-Highlight/current line-comments. It seems to be ignored by NDN now. Should it work or be removed? I prefer removing, but it`s only imho.

 

3. Logic in current line highlighting:

In 2.15.7555- versions color of text is changed only if it differ from normal color. I like this behaviour. But:

a.Why this logic isn`t applied to current column highlight?

b.Why this logic isn`t applied to background(i mean that now current line BG is changed in keywords with non-default BG(maybe optionally))?

 

4. Some words may have same text and bg color(one of colorkeywords for exaple). Should this be checked at the last stage of selecting color of symbol in editor?(after current line processing)

 

5. I think it would be useful to add following commands to NDN.hgl:

RegKeywords1,...,RegKeywords8

RegKeywords color comment

RegKeywords color symbol

RegKeywords color string

RegKeywords color number

(for using colors defined in color scheme)

This`ll make HGL files logical and much more portable between different color schemes.

 

Note: all except 1 are only wishes

Share this post


Link to post
Share on other sites

hi gpf!

 

1. sorry, fixed

 

2. true, removed

 

3.

a. good question ... done!

b. i am not sure what the exact reason for this behaviour was, but i think it is a good idea.

it can happen pretty quickly that no character of the current line will be highlighted

(comments f.ex.)

 

4. i think the user itself should handle such problems

 

5.

do you mean that RegKeyWords1-8 should use the highlight colors

from the color setup?

and, RegKeyWord color (comment|string|symbol|number) should use

the color setup colors for comment, string ...?

 

btw, in your ndn.hgl update you also redefine numbers with RegKeyWords

can you tell me why?

 

Stefan / AH

Share this post


Link to post
Share on other sites
GPFault    0

Hi AH!

4. i think the user itself should handle such problems
There is ColorKeywords option in NDN hgl. It produce keywords of all 16 colors. Obviously one of them is invisible. Or I may want to define color-scheme independent HTML keywords like "black","white", and ~200 keywords more.

 

do you mean that RegKeyWords1-8 should use the highlight colors from the color setup?
Yes.

 

RegKeyWord color (comment|string|symbol|number) should usethe color setup colors
Yes. And "RegKeyWords color normal" also may be useful if you want some words that are affected by regkeyword regexp not to be keywords. I really want to use such a highlight for txt files(with flags to turn off ' highlight):

;Do not treat words like   isn't   as start of string
RegKeyWords color normal \wn't
;highlight other strings in '
RegKeyWords color string '[^']*'

you also redefine numbers with RegKeyWords

can you tell me why?

I redefined numbers in C/C++ because internally NDN support ul postfix and doesn`t support ull postfix. Also i want to highligh numbers beginning with 0 with different color because they are treated by C/C++ as octal (i hate octal). And some other: 0x0.02p-2f is a valid number in C (hex float) :). imho a special flags to handle different preffixes are obsolete. RegExps are more powerful.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×