[squeak-dev] autoEnclose preference (was: Preference settings for 5.3 release)

tim Rowledge tim at rowledge.org
Tue Dec 24 05:13:29 UTC 2019



> On 2019-12-23, at 7:41 PM, Chris Muller <asqueaker at gmail.com> wrote:
> 
> It is only the autoEnclose preference that causes problems in
> workspaces,
> 
> What "problems" are those?   Just as you see in the subject-line of this email, for every open-parenthesis, there's a closing, as well as for every open bracket, a closing.  That's the structure of these characters in every normal context.  "Problems" arise when they get out of balance, which is why other editors have this feature too.  IIRC, eclipse was doing it in 2005.
> 
> IMO, it's a good thing for developers and users alike.

Problem is that when you type a ( you get () - which is fine if you're about to type (fooble +2) but really irritating if you already have fooble + 2) and want to add the ( in front. Which seems to be something that happens frequently enough to me that the irritation level is very considerable. 

Now, the 'enclose selection with brackets' option is much less annoying *to me* - apart from anything else I got used to it decades ago. It's useful when editing, as opposed to 'streaming', code. Of course, it gets annoying if you wanted to replace the selection with (.
Happily cmd-shift-( actually does a "wrap selection with ( and leave selection as-is" so it is possible to do both ways almost without any problem. With both the auto-enclose and enclose-selection disabled you can
type (foo
type foo, go back and add ( in front
type foo, select it, wrap with cmd-( to get (foo)
type cmd-(foo and get (foo)
So *at worst* you'd have to hit cmd-( to get the () you want, and of course the preference is still there for you and any other people that are able to stream out code without having to stop and ponder after every (small prime number of) characters.


tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Computers are only human.




More information about the Squeak-dev mailing list