API to copy/insert text into terminal pane

Hi all. I have had a downstream feature request for my extension to support passing code from the editor to a terminal. There is some potential value here for any language with a REPL that may be running in a terminal pane. I don’t think a task is the right approach because in this use-case the command would not be one-shot – users would want the ability to run several snippets of their code consecutively within a single environment. I do recognise that there are some subtleties though, like how to deal with multiple open terminal panes.

Is there any way to achieve this, and if not, would Panic consider it for a future update?

Thanks, and all the best for 2021.

3 Likes

Yes, we can definitely consider this as an extension API request!

3 Likes

I‘ll also be very interested in this in order to develop an extension to streamline unit tests workflow: it’d be better to run the current test in an integrated Terminal pane rather than an external app.

2 Likes

I want to help you with that extension when the new apis arrive!

[I’ve just joined the Nova developer forum.]

Hello Logan,

has Jon’s API request found its way into Nova in the meantime? I, too, would like to add the ability to send selected text in my editor to an open terminal — that would save users from copying in the editor/pasting in the terminal and the focus would remain in the editor all the time. This could lead to (more) swift interactions with all kinds of REPLs.

Best wishes,
—Torsten

It has not, sadly. We haven’t yet exposed the terminal in any way to the extension API.

We definitely need this api added!

This API is still needed. Sending users to Terminal or iTerm via AppleScript is a workaround, but defeats the purpose of the IDE.