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

Chris Muller ma.chris.m at gmail.com
Tue Dec 24 06:48:34 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.
>

I think it boils down to whether you want to edit "expressions" or edit
"text".  The preferences are optimized to let you choose one or the other
and, if you stick to it, serve you well.  As someone who prefers the
expression-editing style, I never run into "fooble + 2)" because I never
type a closing paren-bracket, ever, I just don't, because it means you're
instantly out of balance which, I simply can't do in my editing.
Unbalanced paren-brackets forces me into tedious "text editing" mode where
all analysis stops so I can hunt down the missing whatever just to get back
to syntactical validity.  If I need to enclose an expression, I always only
select it and use the hot key.  In that way of working, autoEnclose is
always fine.

 - Chris


>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> Computers are only human.
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20191224/6f9a8ff9/attachment.html>


More information about the Squeak-dev mailing list