maria icon indicating copy to clipboard operation
maria copied to clipboard

Explain typing of parens

Open danyx23 opened this issue 5 years ago • 4 comments

Issue:

I just tried the intro and either there is a bug in how the editor behaves on my system (Win 10, Firefox but same on Chrome) or I think this warrants some explaining in the intro: When I come to the Shapes and Colors section and want to type in my (circle 23) fragment, I duly type (, then circle 23 and then I want to close the parens with ) but here instead I get a pair of parens. Deleting only works on the whole pair. It took me a while to realize that in this setup, you should always type the closing parens and work in pairs but as best I could tell this is never explained somewhere but very unintuitive to people used to other text editors.

Because the behaviour of typing parens is not symetric, it seems pretty much impossible to fix unbalanced parens either. I have never really worked in any kind of lisp, but maybe it would make more sense to make both parens keys behave the same but add an easy "surround selection with parens" behaviour like in many text editors when you type a parens when a selection is active?

I also went through the quickstart section but couldn't find any mention of this either (mind you I'm a bit tired and may have overlooked it).

Environment:

  • Browser: Firefox
  • Platform (Mac/Windows/Linux): Windows 10

URL to a gist replicating the issue (if possible/relevant)

danyx23 avatar Aug 22 '19 19:08 danyx23

Thanks for reporting this. This definitely sounds like something we could explain better in the editor quickstart.

daveliepmann avatar Aug 23 '19 12:08 daveliepmann

@danyx23 thanks for the report - by chance are you using an international keyboard? I know that we have some issues affecting various keyboard layouts which might be the culprit here

mhuebert avatar Aug 23 '19 13:08 mhuebert

@mhuebert yes this is on a German keyboard

danyx23 avatar Aug 23 '19 13:08 danyx23

@danyx23 The intended behavior of the editor is to open a new pair of parens and place the cursor between them when someone types (. Unfortunately, different keyboard/OS combinations produce different key codes that can confuse this behavior, which leads to weird bugs like this one!

jackrusher avatar Aug 23 '19 14:08 jackrusher