On 18. Jan 2021, at 10:19, Marcel Taeumel <marcel.taeumel@hpi.de> wrote:
Hi David.
> I wonder whether it's possible to display the assignment operator '_'
> underscore as Left Arrow.
Well, the original font rendered the underscore character ("_") as a left arrow. One could still extend Shout to add a special text attribute to either "_" or ":=" to change to a font that has such a property. Maybe take a look at FormSetFont and the example in FormInspector >> #embedForm:inText:.
Of course, you could directly change the system's code font to one that renders all "_" as a left arrow, regardless of the context.
Note that it might be confusing for some users to see a left arrow as a single entity while actually having to type ":" and "=".
Also note that we removed all underscore assignments ("_") from Squeak's Trunk repository. For good. :-)
SyntaxHighlightingAsYouTypeLeftArrowAssignment _should_ work:
"
'If true, and syntaxHighlightingAsYouType is enabled, all ANSI format assignments ( := ) will be converted to left arrows ( _ ) when a method is selected in a Browser. Whilst editing a method, this setting has no effect - both the left arrow and the ansi format may be used.
"
If I enable it, I see _ instead of := in all methods, so it works fine.
Note that the fonts themselves support swapping _ and ^ for arrows.
Variant A: (destructive) See TextStyle>>#makeArrows
Variant B: (semi-destructive)
See StrikeFont>>#useLeftArrow and StrikeFont>>$#useUnderscore.
However, useLeftArrow is not completely right.
It should read:
useLeftArrow
self characterToGlyphMap.
characterToGlyphMap at: 96 put: 131.
characterToGlyphMap at: 95 put: 130.
After that, If you do
```
Preferences enable: #syntaxHighlightingAsYouTypeLeftArrowAssignment.
Preferences standardCodeFont useLeftArrow.
```
You'll see:
However, shout seems to do strange things there if #syntaxHighlightingAsYouTypeLeftArrowAssignment is on.
It tries hard to show the "assignment" as _ no matter what.
That said, It is supposed to somewhat work :)
Best regards
-Tobias
Best,
Marcel
Am 16.01.2021 17:03:31 schrieb stes@PANDORA.BE <stes@telenet.be>:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hi,
Platform: squeak 4.19.5 with Squeak 4.6 or squeak 5.x with Squeak 6.0alpha
I wonder whether it's possible to display the assignment operator '_'
underscore as Left Arrow.
"Cuis-Smalltalk" is doing this, looks very nice.
I've found something on wiki.squeak.org :
syntaxHighlightingAsYouTypeLeftArrowAssignment
in preferences.
Go to Menu -> Tools -> Preferences
(or Menu -> Apps -> Preferences Browser)
Search : syntaxHighlightingAsYouType
(it's under "browsing')
enabled
syntaxHighlightingAsYouTypeLeftArrowAssignment
enabled
does not work : do I need "Shout"
http://wiki.squeak.org/squeak/5700
is Shout still working in 4.6 ?
I have the impression from the wiki.squeak.org page that there existed
a package to display '_' as left-arrow but not sure whether it is still there.
David Stes
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
iQEcBAEBCAAGBQJgAw4BAAoJEAwpOKXMq1Ma/1gIAK0vac+7G0o+nxaUZpwUZWEG
tpeh0Bg+aruVO330FkJajKDkGxpnRdQ+9sjRQQ1jE3ZDY1V+V7zqQz0fciOtE56L
24l0A3gkhElte7B6zIpXwEUKwBPGrv1egA024JIuxw3Xb/FWNKZeUwMdyZGtn0nW
LAlPjcv+r+/91Bkx8KuLT7E2Jas/JL3UpYYug9/F5umE/maN4+E3aKfggef8VKvz
fdm7xDYBCDatQFqwsa1ixdKxAGql0+SID7QY1tRQ2hvBdl1jQmBWT6wXF9sDRELm
YzXf2TWUiXUQDefr0Yc+qsJbYETKf0D4PmsdxNGgwwZ7zFbWpDm/OKy73wyhMiA=
=xekh
-----END PGP SIGNATURE-----
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners
_______________________________________________
Beginners mailing list
Beginners@lists.squeakfoundation.org
http://lists.squeakfoundation.org/mailman/listinfo/beginners