[Lazarus] The color of special characters in the Source Editor

Graeme Geldenhuys graemeg.lists at gmail.com
Fri Sep 16 10:11:07 CEST 2011


On 16/09/2011 09:52, Martin wrote:
> I myself used (past tense) to have that on all the time, for #9 
> detection. But then every space is a dot. So I set the space foreground 
> color, near the background, and all the special chars are faded out.
> Only in comments and strings, it looks like hell.
> 
> For me personally it might already be solved by show #9 as special char 
> only.  (though I actually liked the spaces too)
> 
> My current idea is to make the color (forground) alpha adjustable.


I too wanted to remove the "dot" for spaces from the synedit code
[because string literals and comments are hard to read], so that only
tab characters are shown. While having "show special character" enabled,
I couldn't figure out what is a real dot in a string literal and what is
a "fake show special chars dot" in a string literal. See attached image.

>From the image, it is impossible to say if that string literal really
contains a utf-8 dot character, or if it is just a fake dot (space
indicator).

I have a look at a few other editors that show such special characters
too. Most of them simply paint the "fake space dot" in specified color,
even in string literals (that may have a different color). See attached
image of EditPad Pro

What EditPad Pro does makes it clear that the "greyed dot" is a space,
and not a utf-8 dot character in the string literal. Even comments are
easy to read. This seems like a easier solution to the problem than the
"blended alpha channel color text", but it is obviously up to you what
you want to implement.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Untitled.png
Type: image/png
Size: 948 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110916/34758a25/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: EditPad_Pro.png
Type: image/png
Size: 7656 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110916/34758a25/attachment-0007.png>


More information about the Lazarus mailing list