Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Insertion of brackets to make a multi-dimensional expression (like "var[x][y]") #325

Open
PwtKCL opened this issue Nov 28, 2024 · 1 comment

Comments

@PwtKCL
Copy link
Collaborator

PwtKCL commented Nov 28, 2024

When composing code, it can be required to "insert" a new pair of brackets when dealing with multi-dimensional elements.

For example, I have this code:
image

and later I want to use "var" as a 2-dimension list, and would like to have this result ... :
image

... ending up there by typing '[' then "prev" to insert that new indexer is tricky with Strype, because typing '[' before the existing bracket (the one of "x") will overtype the existing one, and therefore we can't insert the new indexer by directly typing it. (We can of course try to work around that behaviour by doing copy/paste actions for example.)

@PwtKCL
Copy link
Collaborator Author

PwtKCL commented Nov 28, 2024

Discussed in last week's group meeting, we decided to make a special new behaviour with the closing brackets (which at the moment do nothing at all in Strype).

Say we have this situation: n[3] and I want to make a new expression n[0][3]

  • if I am between "n" and "[" then hitting "]" will generate a new pair of brackets ("[]")
  • if I am between "[" and "3" then hitting "]" will generate a closing bracket followed by an opening one ("][")

And in any case, the existing behaviour when hitting "[" stay the same as before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant