[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kwrite-devel
Subject:    Re: Re: Default Styles (take two)
From:       Dominik Haumann <dhaumann () kde ! org>
Date:       2014-02-18 10:10:10
Message-ID: 2438562.5O0DDlk42N () obiwan
[Download RAW message or body]

On Tuesday, February 18, 2014 10:49:59 Milian Wolff wrote:
> On Tuesday 18 February 2014 10:06:20 Dominik Haumann wrote:
> > Ok, next round. The current list looks as follows:
> > 
> > Legend:
> >  '-': already exists
> >  '+': new, and makes a lot of sense (only these will survive in the end)
> >  '?': new, really needed?
> > 
> > Text
> > - dsNormal
> > - dsKeyword
> > + dsExtension   (same as keyword, e.g. Qt, tr1, and other extensions)
> > + dsControlFlow (or dsStructure, if, else, switch, continue)
> > - dsFunction
> > - dsDataType
> > + dsVariable    ($bla in php or perl)
> > + dsOperator    (for +-*/::<> etc..., lots of languages define this)
> > 
> > Strings & Characters
> > - dsChar
> > - dsString
> > + dsRawString   ('' in Perl, CoffeeScript and Bash, r'' or r"" in Python)
> > ? dsSpecialString (was dsRegExp previously)
> > ? dsSpecialChar   (no idea what this is?)
> 
> As far as I understood Matthew, this would be e.g. a non-escaped character
> of special meaning. E.g. any of (){}.*? in regular expressions. Would/could
> also be used by \n \t and other escape sequences in "normal" strings.

So "this \" is a string" would highlight \" with dsSpecialChar ?

> > Numbers & Types
> > - dsDecVal
> > - dsBaseN
> > - dsFloat
> > + dsBoolean     (true, false, TRUE, FALSE, often used in languages)
> 
> I don't like this. These are just keywords and should be highlighted like
> that. The dsConstant at least would be useful in some languages, to e.g.
> highlight enums, or built-in constant values.

In that case, I'll turn it into a dsConstant again the next round.


> > Will these default styles enable us to ditch many/most of the hard-coded
> > colors?
> 
> Looks really good. Imo once this is in, one could start to port the
> languages and then see what is missing. Maybe we still need some generic
> "misc0-9" colors.
> 
> I hope to have some time tomorrow for hacking on a unified place to provide
> such default colors. Then, one could add the new colors there in one central
> place.

Btw, I'd like to see a feature in the "Default Text Styles" config page that
shows a label at the bottom listing all itemDatas of the currently selected
highlighting (in Highlighting Text Styles) that use the currently selected
default style.

E.g. if you select Comment, it'll say on the bottom
"C/C++ uses the style 'Comment' in the following items: Comment"
or:
"C/C++ uses the style 'Others' in the following items: Preprocessor, Prep. Lib"

I think this would help to quickly grasp how a language uses the default styles.

Greetings,
Dominik
_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@kde.org
https://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic