Apparently it's not possible to set the color for control characters (e.g. CR/LF) because the color attribute is not used for STYLE_CONTROLCHAR. However for a less distracting CR/LF display, it would be helpful to be able to set the color to one that is different from the normal text.
However, I'd also suggest to rework the CR/LF characters to a "nicer" look and/or add an option to just display a "paragraph" symbol as this is done in the Eclipse editor (or UltraEdit) instead of separate CR/LF symbols. While it can make sense to display CR/LF explicitly, most of the times only the general paragraph information is needed.
I thought that a combined CRLF symbol may be an OK option but the mailing list opinion on this was negative.
I won't be working on either of these.
Well, a combined "parapgraph" symbol works perfectly well in the Eclipse editor (and others like UEdit) and honestly the curent display of CR/LF symbols with filled black background looks absolutely horrible and unprofessional. I can understand that (at least as long as the hex editor plugin is only so-so) some people want an explicit CR/LF display (and the current symbols might serve as a stopgap), but combining them into one paragraph symbol at least as an option seems like a natural choice.
It's a bit beyond me why an otherweise brilliant editing component would deliberately choose not to implement it. Given that there are no important architectural reasons that would forbid this of course.
Last edit: 0xdeadbeef 2015-12-18
Implementation requires time and effort which has to be performed by someone. Possibly others will be interested in working on this. To me, there are plenty of issues that are more interesting or beneficial than this one.
Not being able to draw CR/LF symbols in a color which is less prominent than actual text is quite irritating for users and has been annoying me for ages. I cannot comprehend why this is not considered beneficial enough to fix. I do prefer the CR<->LF distinction over the Eclipse approach though.
I support this feature request very much. I'm using notepad++ which relies on scintilla and often use the option to display End of Line characters. But right now the style of the CR LF characters and also other non printable characters is much to intensive. The "white letter within black background"-style is quite irritating.
People using Notepad++ (and other scintilla depended Editors) would be glad if the style of those non printable characters could be individually changed. So we would ver much apppreciate if you could think about improving scintilla with this (not too difficult to implement?) feature request. Thank you very much!
Hope that this feature could be done, the actual colors of the EOL CR LF character is too distracting, maybe just use the same color but using some opacity.
I use Notepad++ and I support this feature. I commented about it here
Currently, this is really the most disturbing issue in Notepad++, IMHO.
SCI_SETREPRESENTATIONAPPEARANCE and SCI_SETREPRESENTATIONCOLOUR added in [5ac616].
Related
Commit: [5ac616]
Optimized std::map updating for SpecialRepresentations and PropSetSimple.
PropSetSimple::GetInt() and Accessor::GetPropertyInt() can change key to std::string_view as all lexer properties are string literal.
Doesn't the changed
PropSetSimple::Set
return true even when the value is the same?!updated && it->second != val
If its worth the extra complexity of emplace then its worth looking at the actual hot path which will be for an existing key (there's a limited set of properties) and for the same value as presently set. According to https://en.cppreference.com/w/cpp/container/map/emplace,
Performing a
find
first then checking that for an early return would avoid some construction. Perhaps realize the key string_view into a string so it can be reused if inserting is required.Changed PropSetSimple so all key arguments are string_view with https://github.com/ScintillaOrg/lexilla/commit/f9c6debea7296f598c9b7b324fad426afb2fa54c
Changed to https://en.cppreference.com/w/cpp/container/map/try_emplace and https://en.cppreference.com/w/cpp/container/map/insert_or_assign
Ran benchmarks on PropSetSimple::Set for
1) the original code (which doesn't report update so not equivalent),
2) PropSetSimple.diff with &&
3) PropSetSimple-2.diff
4) Using find
5) Redeclaring mapss with a compare argument so it can be called with std::string_view then calling it with string_view.
The results are (shaving off last 3 digits and superfluous text):
64-bit Release Visual C++ 16.10.2
32-bit Release Visual C++ 16.10.2
The code for PropSetSimple::Set:
Benchmark (using catch.hpp for timing):
Some changes with https://github.com/ScintillaOrg/lexilla/commit/aaefcf15828605e219bb411e8dc8a78cfa65e35b
Changed SetRepresentationAppearance and SetRepresentationColour but not SetRepresentation with [757e44] .
Related
Commit: [757e44]