Open stepheneb opened 5 years ago
It seems like copying with newlines escaped could be useful for a text editor in general. Maybe it could be made into its own package? (I didn't see an existing package like this during a quick search).
@stepheneb, the feature shouldn't be hard to implement, but it would be a special copy command (e.g. Elmjutsu: Copy For Repl
). Are you okay with that?
That would be fine!
Also if you want to outline where changes should be made I'm also happy to try and implement the feature and generate a pull request.
On Tue, May 21, 2019 at 4:24 AM halohalospecial notifications@github.com wrote:
@stepheneb https://github.com/stepheneb, the feature shouldn't be hard to implement, but it would be a special copy command (e.g. Elmjutsu: Copy For Repl). Are you okay with that?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/halohalospecial/atom-elmjutsu/issues/167?email_source=notifications&email_token=AAABYFFV4RUQACUXHOJ6BGDPWOWSJA5CNFSM4HL6ATHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODV3EWYQ#issuecomment-494291810, or mute the thread https://github.com/notifications/unsubscribe-auth/AAABYFB4O5DC33O4JV3YJKLPWOWSJANCNFSM4HL6ATHA .
-- Be curious and kind whenever possible, https://learnmaketeachshare.org/
@stepheneb, you can add the command in lib/main.js
Somewhere here:
this.subscriptions.add(
atom.commands.add(
'atom-text-editor:not([mini])[data-grammar^="source elm"]',
{
'elmjutsu:quick-fix-file': () => this.quickFix.quickFixFileCommand(),
'elmjutsu:set-main-paths': () =>
this.elmMakeRunner.setMainPathsCommand(),
'elmjutsu:set-compile-output-path': () =>
this.elmMakeRunner.setCompileOutputPathCommand(),
'elmjutsu:go-to-definition': () => this.goTo.goToDefinitionCommand(),
'elmjutsu:go-to-symbol': () => this.goToSymbol.goToSymbolCommand(),
'elmjutsu:find-usages': () =>
this.findAndRenameUsages.findUsagesCommand(),
I'd like to be able to copy selected multiline Elm code into the clipboard and be able to paste it into the elm repl formatted to be able to be successfully evaluated.
I'm curious whether this is possible ... and how hard it would be -- or maybe it already exists??
For example this code copied and pasted into the elm repl generates an error:
Adding
\
at the end of each line except for the last allows the repl to evaluate it successfully: