representations property

21 views
Skip to first unread message

Neil Hodgson

unread,
Jun 8, 2021, 6:52:13 PMJun 8
to scite-i...@googlegroups.com
   Representations are the blobs that appear in SciTE for control characters that appear like [NAK] or [CR]. It is now possible to customize these with the “representations” property. This is capable of displaying a representation for any character and can be used to add information or to clarify a character.

   Illustration with original text in right pane and with representations in left pane:

   From the documentation:

   Sets up a different way of displaying particular characters. It contains a list of items separated by ','. An item may define the representation of a character or set an appearance or colour. A representation item contains a character followed by '=' and its representation text. Hexadecimal Unicode escapes may be used: '\x' followed by 2 hexadecimal digits, '\u' followed by 4, or '\U' followed by 8. Appearance items start with '!' followed by an optional appearance number, '0' for plain or '1' for blobs, '' for default. Colour items start with '#' followed by 6 (opaque), 8 (translucent), or 0 (default) hexadecimal digits. By default, representations are shown in the colour of the style of the original text. Appearance and colour items continue to affect following representation items until they are changed or reset. To specify the characters '\', '=', ',', '!', or '#' use an escape. Only single characters can be represented except for the special case of Windows line ends Carriage Return + Line Feed.
The following example shows 'π' as a blob 'Pi'; '₪' as a blob 'shekel(₪)'; and with View | End of Line turned on Carriage Return + Line Feed appears as translucent red text 'crlf’.

representations=π=Pi,\u20AA=shekel(\u20AA),!0,#FF000090,\x0D\x0A=crlf

   Available from the repositories:
git clone https://github.com/ScintillaOrg/lexilla
hg clone http://hg.code.sf.net/p/scintilla/code scintilla
hg clone http://hg.code.sf.net/p/scintilla/scite
   and from
https://www.scintilla.org/scite.zip  Source
https://www.scintilla.org/wscite.zip Windows executable (64-bit)

   Neil
Reply all
Reply to author
Forward
0 new messages