[plt-scheme] Parentheses and color

From: hendrik at topoi.pooq.com (hendrik at topoi.pooq.com)
Date: Thu Jul 5 09:22:45 EDT 2007

On Thu, Jul 05, 2007 at 12:42:44PM +0100, Dave Gurnell wrote:
> I have an alternative proposal (well, two actually):
> I would find this feature most useful when searching for mismatched  
> parentheses at the request of the compiler. With this in mind, this  
> feature could be one that can be turned on/off like check syntax (so  
> we get around the visual crowding issue).
> IMO, highlighting the *parentheses* is only marginally useful:  
> they're too small for the colouring to stand out. once you've found,  
> say, the cyan opening bracket, it can take a while to scan through  
> and find the closing bracket of the same colour. DrScheme's grey  
> highlight feature is much faster for this kind of thing. In other  
> words, don't colour the parentheses: colour the forms themselves.
> Has anyone ever seen the Firefox "Web Developer Toolbar" addon? The  
> "Display Topographic Information" feature (in the "Information" menu)  
> colours the current page according to the block structure of its  
> elements. Take this Google results page as an example:
>     http://www.davegurnell.com/files/no_topographic_information.png
>     http://www.davegurnell.com/files/topographic_information.png
> While the colouring leaves a little to be desired, the version with  
> topographic information clearly shows all the DIVs and table cells.  
> The feature is only marginally useful when debugging HTML, but I  
> reckon it could be really useful for finding mismatched/misplaced  
> parentheses in s-expressions (including quoted expressions where  
> indentation is not always obvious).
> And here's another idea:
> Correct/automatic indentation helps identify a lot of structural  
> mistakes in s-expressions, but if the expression is large and  
> complicated, it's not always obvious which column a line starts in.  
> Perhaps one could colour DrScheme's background in the manner of line  
> printer output. I've put an (IMHO) aesthetically pleasing example here:
>     http://www.davegurnell.com/files/ 
> drscheme_with_column_highlighting.psd

Note to the free-software users here:  this appears to be a photoshop 
file, and the gimp can display it.  I used the version from etch (I 
think 2.2.13).

> I've seen this in editors in the past and I never found it  
> particularly useful then, but I wasn't programming Scheme back then.  
> Another option is highlighting the column that contains the cursor (I  
> think TextMate does this but don't quote me on it).
> Anyway - these are just thoughts. Hopefully I haven't suggested  
> features that I've never noticed, that are already available in  
> DrScheme (though I did check just in case).
> Cheers,
> -- Dave
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme

Posted on the users mailing list.