[Pharo-project] Syntax highlithing
Hi guys I think that we should really change the following behavior. If I have an instance variable abc when I type ab is should not be colored in red first then when I type c get black It should tell me that ab is correct and only get red when I type abx I got this behavior for the kid book. Does anybody have an idea how we can fix that? Stef
On 2013-04-10, at 10:28, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guys
I think that we should really change the following behavior. If I have an instance variable abc
when I type ab is should not be colored in red first then when I type c get black
It should tell me that ab is correct and only get red when I type abx
I got this behavior for the kid book.
Does anybody have an idea how we can fix that?
Well it mostly depends on the parser. But the behavior you describe is pretty common in other languages. To be precise, you actually have invalid code, but you are on the way to make it valid. For me a solution would be a timer/delay when the syntax coloring hits in. So while you are typing it stays black, but after some 200ms pause it will give you feedback (also when you press any of: ' ,;:[]|(){}").
Camillo Bruni-3 wrote
To be precise, you actually have invalid code, but you are on the way to make it valid.
There was a similar thread on the Squeak list a while back about graying out subsequent code when making a change in the middle of some code. e.g. If I have a method with 7 lines (of course I wouldn't have more ;)), and I'm editing statement 3, statements 4-7 would be grayed out instead of red while I was editing. I guess Cami's time delay could work too (just keep subsequent code with normal coloring until editing is complete). ----- Cheers, Sean -- View this message in context: http://forum.world.st/Syntax-highlithing-tp4680534p4680608.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
The thing with such delays is that they're different for each user. Some type fast, and others type slow. As a note, Eclipse works the way Stephane describes. What I like more than a different color is an underscore line, not just for coding, but like the one in the spellcheckers. It gets your attention better (or mine at least), and is the most common way of telling the user something is not recognized. Regards!
Hi guys
I think that we should really change the following behavior. If I have an instance variable abc
when I type ab is should not be colored in red first then when I type c get black
It should tell me that ab is correct and only get red when I type abx
I got this behavior for the kid book.
Does anybody have an idea how we can fix that?
Well it mostly depends on the parser. But the behavior you describe is pretty common in other languages. To be precise, you actually have invalid code, but you are on the way to make it valid.
Yes but you have a difference between code that may be correct once you finish and one that is totally incorrect now. For the botsinc book I did it and you were always sure that you are going in the right direction.
For me a solution would be a timer/delay when the syntax coloring hits in.
No for me the solution is feedback that tells me continue you are on the way or stop you got it wrong now. I already did that in the past.
So while you are typing it stays black, but after some 200ms pause it will give you feedback (also when you press any of: ' ,;:[]|(){}").
Stéphane Ducasse wrote
I think that we should really change the following behavior...
I opened an issue: 10264 Syntax Highlighting: Less red during editing https://pharo.fogbugz.com/f/cases/10264/Syntax-Highlighting-Less-red-during-... ----- Cheers, Sean -- View this message in context: http://forum.world.st/Syntax-highlithing-tp4680534p4680627.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
thanks sean! To me this is a quality change. Today I was doing a demo in front of students and I was surprised that my instance variable was getting red while I was sure it was there. Stef On Apr 10, 2013, at 3:10 PM, Sean P. DeNigris <sean@clipperadams.com> wrote:
Stéphane Ducasse wrote
I think that we should really change the following behavior...
I opened an issue: 10264 Syntax Highlighting: Less red during editing https://pharo.fogbugz.com/f/cases/10264/Syntax-Highlighting-Less-red-during-...
----- Cheers, Sean -- View this message in context: http://forum.world.st/Syntax-highlithing-tp4680534p4680627.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
participants (4)
-
Camillo Bruni -
Esteban A. Maringolo -
Sean P. DeNigris -
Stéphane Ducasse