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

List:       kwrite-devel
Subject:    Re: Default Styles
From:       Matthew Woehlke <mw_triad () users ! sourceforge ! net>
Date:       2014-02-17 23:27:47
Message-ID: ldu5t5$ots$1 () ger ! gmane ! org
[Download RAW message or body]

On 2014-02-17 18:13, Milian Wolff wrote:
> On Monday 17 February 2014 17:59:58 Matthew Woehlke wrote:
>>> Strings
>>> - dsChar
>>> - dsString
>>> ? dsRawString   (new, '' in Perl, CoffeeScript and Bash, r'' or r"" in
>>> Python) + dsRegExp      (new, JavaScript and other languages heavily rely
>>> on it) ? dsRegExpOp    (new, RegExp semantics: ^\., [:space:], ...)
>>
>> I think I'd like to see dsRawString; it's fairly common and can readily
>> be overloaded for other flavors of "this is a string... sort of" if it
>> isn't used more directly.
>>
>> I'm less sure about dsRegExp (IMHO I'd rather have dsRawString first, or
>> maybe even e.g. dsSpecialString which could be used for regexp's in
>> cases it isn't needed for something else). Also, if we went with
>> dsSpecialString (instead of dsRegExp, and maybe also dsRawString), then
>> we could have a dsSpecialChar to go with it, which I think would be
>> better than dsRegExpOp.
>
> This is actually a very valid concern. The more I think about it, the less
> convinced I am we need a special regexp highlight. Just use a string but give
> the chars in that string which have regexp-features special highlighting.

In e.g. perl, you *really* want regex's to be a different color :-). But 
I would lean strongly to something like dsSpecialString instead of 
dsRegExp, as it's more general, and could possibly be used for raw 
strings also.

>>> Misc
>>> ? dsLink        (new, url, path)
>>
>> I think I liked dsReference better (or at least in addition). I've been
>> doing a ton of reST lately and there are reference entities that are
>> debatable if they are links. (In fact, if you look at reST, is has
>> separate attributes for several flavors of references and targets, not
>> all of which use the same default attribute. But wanting both is still
>> probably unusual.)
>
> In reST you don't have data types though so you could just create a named
> style which uses dsDataType or similar, no?

That's what is done currently. Semantically, it's not optimal, however. 
(But suggests that dsDataType and dsReference/dsLink could have the same 
color by default.)

-- 
Matthew

_______________________________________________
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