Does there exist a package in Atom that allows the user to send a selection of lines to a terminal? I mean something like this in Sublime: https://github.com/randy3k/SendCode. I’m mostly interested in running Python code line by line into a IPython terminal (I’m not looking for the Hydrogen package).
All of the code runner packages work by sending lines of code or whole files to other programs. The one that gives you the most freedom is
What syntax would you use to run the code into IPython from the command line?
Thank you for the tip.
I would like to select some lines of code and Ctrl + Enter to send them to a terminal (and if no selection is used then send the line of code where the cursor is), where I’m running IPython.
How do you do that using the command-line interface? If you tell me that, I can tell you how to configure
In Sublime I simply add the SendCode package, choose where I would like to send the code (tmux, RStudio, etc.) and then I can simply send the code to the chosen destination using Ctrl + Enter. I usually use tmux. SendCode does not require me to have any special REPL open in tmux, it will send it there no matter what, which is pretty nice. Slime in vim is quite similar.
You could use Atom package ‘platformio-ide-terminal’ for that.
Run the selected text as a command in the active terminal.
but I use package term3 for ipython
I don’t know anything about tmux and what you’re working on is a workflow that I haven’t had any experience with. I can find the code file that determines how the commands are sent to
tmux, but I don’t know anything about how that looks or feels from the user side. I need you to help explain the actual sequence of commands that get sent to the shell and I can tell you how to make that happen in Atom.
It’s basically the same workflow as one has for example with Jupyter notebooks, where one can run one row or selection at the time, but here it is done using the editor and the terminal.
I don’t know the exact commands that happen with SendCode, I would have to take a look at the source code for SendCode to understand that.
I’ll try this. Thanks!