-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Add run-selected-text to run (Julia) code snippets in the terminal #16102
Comments
As I understand it you're asking for multiple things:
The first is best filed as an issue on the zed-julia extension repo: https://github.com/JuliaEditorSupport/zed-julia/issues/ As for the second, does Thorsten's reply to the issue you mentioned (#12598) not satisfy this with tasks?
|
Yes, right. My comment in JuliaEditorSupport/zed-julia#4 (comment) shall rather be summarized in a separate ticket with a specific feature request then.
How I understand tasks, they do not exactly match my needs. As the shell to be specifed may either be
it seems not to be possible to just paste the selected text to an open terminal as shown in my screenshot. |
Let me add to:
A feature like On my opinion the task is not flexible enough as I have to specify the shell or program explicitely. The |
I agree that a new action like @christiankral: as a hacky workaround, you could put something like the following code into your [{
"context": "Editor && mode == full",
"bindings": {
"cmd-y": ["workspace::SendKeystrokes", "cmd-c ctrl-` cmd-v enter"]
}
}] This copies the selection or the whole line to the pasteboard, switches to the terminal pane, and pastes the clipboard. You can make more bindings that copy'n'paste the whole paragraph or the enclosing block. |
Thanks @piechologist for your key stroke proposal. |
Check for existing issues
Describe the feature
I am writing this feature request with the focus on Julia, but it is certainly not restrited to it.
Form my understanding this feture request ist neither covered by #5141 nor by #12598. The zed julia extension JuliaEditorSupport/zed-julia#4 (comment) seems to require a full project structure with toml file including package and version dependencies. In the testing stage of some Julia code it were advantageous to have the option to just select some code in the editor and execute it in the terminal next to it. Nothing else. A similar feature was implemented in Pulsar with in the "x-terminal" package: The Pulsar command to perform this action is:
x-terminal:run-selected-text
and its main advantage is its simplicty. If connected to a shortcut, e. g. CTRL + ALT + SHIFT + ENTER, it can be easily integrated into a quick testing procedure.I guess this feature is not yet implemented in Zed.
If applicable, add mockups / screenshots to help present your vision of the feature
No response
The text was updated successfully, but these errors were encountered: