Syntax colour for guard

For users of dfns, both novice and expert

Syntax colour for guard

Postby Phil Last on Wed Jun 26, 2019 9:20 pm

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?
User avatar
Phil Last
 
Posts: 624
Joined: Thu Jun 18, 2009 6:29 pm
Location: Wessex

Re: Syntax colour for guard

Postby Vince|Dyalog on Thu Jun 27, 2019 9:18 am

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
Vince|Dyalog
 
Posts: 406
Joined: Wed Oct 01, 2008 9:39 am

Re: Syntax colour for guard

Postby Phil Last on Thu Jun 27, 2019 11:12 am

Wow. thanks Vince!
User avatar
Phil Last
 
Posts: 624
Joined: Thu Jun 18, 2009 6:29 pm
Location: Wessex

Re: Syntax colour for guard

Postby Adam|Dyalog on Fri Jun 28, 2019 10:22 am

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
Adam|Dyalog
 
Posts: 134
Joined: Thu Jun 25, 2015 1:13 pm

Re: Syntax colour for guard

Postby ray on Fri Jun 28, 2019 8:29 pm

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.
User avatar
ray
 
Posts: 217
Joined: Wed Feb 24, 2010 12:24 am
Location: Blackwater, Camberley. UK


Return to Functional Programming

Who is online

Users browsing this forum: No registered users and 1 guest