-
Notifications
You must be signed in to change notification settings - Fork 26
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
eval multiple statements/blocks in one command #5
Conversation
Looks good to me -- and great idea on the |
found a major issue with this PR. |
OK fixed that. |
Hmm good point, probably other things will still break, e.g. multiline 'let' statements. |
@yaxu yes just confirmed the problem with perhaps we can map then to eval the entire file, map that to.... ??? |
One question is, what is best for beginners? I think the do wrapping probably is, at least I've seen people get confused by multiple patterns not working when they're next to each other.. Actually how about this:
|
BTW I think adding an additional mapping for |
@yaxu ok thanks for the suggestion on the 0-col non-whitespace. I'll give it a try. |
@yaxu that seems to work, however it now requires proper indenting for any multi-line code in Atom. I think a lot of beginner users are used to not having to do proper indenting in Atom:
With the non-whitespace-in-column-zero change, the code must be changed to this in order to work:
I know my compositions would be affected by this. Personally I'm OK with the change, but I think a lot of Atom users might have some pains with this. I'll see if I can get some feedback on Slack (or maybe on the Lurk.org list). |
Hmm I think that's no good then.. |
I think the only other option then is a new keyboard command so that the user can be explicit about the type of eval they want to perform. How about this:
|
do
. support for eval'ing all text, and adjacent multiline blocks
the
|
ok, settled on these keymaps with the last commit:
|
sorry to come in from the side: In sclang we are using a standard delimiter to tell the editor what we consider to be part of one bit of code. In that case it looks like this:
This makes it easy to see what belongs together. |
Closing this and leaving it un-merged. I don't think it's valuable, as there is existing Haskell syntax to eval multiple blocks using |
Wrapped all expressions sent to
ghci
in ado
. This now allows two things:Eval all text in the buffer, which may include many Dirt/SuperDirt patterns, and send them all to
ghci
at oncePerform a multi-line eval on two or more adjacent patterns (with no empty lines between them).