[squeak-dev] Re: Is there a preference setting to block automatic parentheses?

Marcel Taeumel marcel.taeumel at student.hpi.uni-potsdam.de
Wed Feb 25 19:12:19 UTC 2015

Hmm... I guess the user keeps track on what she sees on the screen. Such a
stack of inserted backets must be discoverable/visible somehow. That's why I
think simple context recognition (i.e. the character next du the text
cursor) should be enough and quite discoverable/usable.

We could do it like this: If there is a non-letter-non-digit or nothing
after the cursor, insert the closing char, too. If you type that closing
char yourself, overwrite it--one after another. If you remove an opening
char, remove the closing one, too, if it follows directly. Typing the
opening char on a selection of text encloses that selection.

Such chars could be () [] {} "" ''

Eclipse seems to do it roughly this way...except for the selection trick.
But I like that. :)

@Bert: If you want to type another ) at "bar|))))" then you would miss an
opening brace. ;) If not, you would have to append it after the last ) --
like it is in OCompletion right now.


View this message in context: http://forum.world.st/Re-Is-there-a-preference-setting-to-block-automatic-parentheses-tp4807131p4807691.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.

More information about the Squeak-dev mailing list