Syntax colour for guard

For users of dfns, both novice and expert
Post Reply
User avatar
Phil Last
Posts: 628
Joined: Thu Jun 18, 2009 6:29 pm
Location: Wessex

Syntax colour for guard

Post by Phil Last »

Being one of the old dogs who get overwhelmed rather than enlightened by syntax colouring this is an odd request. To be honest I don't only have green on black. My comments are a darker green, errors are red and idioms white - all still on black of course.

But I've noticed that if I have unbalanced braces the syntax checker assumes all my guards are syntax errors too so turns them all red. This is great because I can actually see them for a change - the colon is such an insignificant little character.

Please can we have the ability to colour them differently from their surroundings?
Vince|Dyalog
Posts: 439
Joined: Wed Oct 01, 2008 9:39 am

Re: Syntax colour for guard

Post by Vince|Dyalog »

Hi Phil,

Dfn Guards are coloured the same colour as Control Structures, so you can set Control Structures to a different colour in Options|Colours...

Regards,

Vince
User avatar
Phil Last
Posts: 628
Joined: Thu Jun 18, 2009 6:29 pm
Location: Wessex

Re: Syntax colour for guard

Post by Phil Last »

Wow. thanks Vince!
User avatar
Adam|Dyalog
Posts: 143
Joined: Thu Jun 25, 2015 1:13 pm

Re: Syntax colour for guard

Post by Adam|Dyalog »

Another really useful, but easily overlooked, feature is the ability to "flash" certain aspects that are not normally coloured in a special way:

Clone your colour scheme by saving it under a new name. Modify the clone to highlight a special language feature, like idioms or control structures, that are otherwise in your "generic" colour. Now assign a hotkey (the field to the immediate right of the scheme selector). Finally select your original scheme.

Whenever you want to highlight the special feature, just press and hold your clone's hotkey until done.

You can have multiple such clones, each highlighting a different aspect. You can even "hide" features by making them identical or similar to the background colour.
User avatar
ray
Posts: 238
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK

Re: Syntax colour for guard

Post by ray »

One colour effect I do like is to use an alternative background colour but ONLY for errors.

So my choice is a "standard" white background for all features except for errors which are shown in Red on a yellow background.

The result is normally a single background colour, but with an error in the function, the problem area stands out with a yellow background. As soon as the error is corrected, the background reverts back to the uniform single colour.

Ray
PS No 2 APLers I have met ever seem to like the same syntax colouring.
"Standards are great, so every one should have there own!" as Peter Merritt once told me.
Ray Cannon
Please excuse any smelling pisstakes.
Post Reply