Closed guoci closed 1 year ago
@ntluong95 Starting a new issue for this. I don't understand you, what are the 2 block codes? Jupyter lab's "Run selected line or highlighted text" feature seems to be similar to this plugin's "Smart execute selection in console".
See the below picture. Only the blue area were sent to the console. The red aera was not evaluated and run.
Jupyter lab's "Run selected line or highlighted text" feature seems to be similar to this plugin's "Smart execute selection in console" --> What I meant is run the selected line or highlighted text in jupyter notebook, which show the result right under the cell, not in the console
I will try to fix that. I get your second point. But that feature is closed-sourced, so you will need JetBrains help for that.
@ntluong95 fixed, https://github.com/guoci/pycharm-smart-execute/releases/tag/0.1.12
Confirmed it fixed. But new error just came. I will create another issue
I will try to fix that. I get your second point. But that feature is closed-sourced, so you will need JetBrains help for that.
This was a thread in YouTrack but seem overlooked: https://youtrack.jetbrains.com/issue/DS-3825/Implement-Run-selection-line-in-console-for-Jupyter-notebooks
Do you think that there is a way to make it as the addition of your extension?
I think this is already implemented in Smart execute code in console, *
actions with 3 variants. Some do not have default keyboard shortcuts so you need to set it yourself.
But it excute code in the console. I want to implement it in jupyter kernal as Python console and Jupyter notebook they don't share variables with each other. You can see the example in Google Colab:
I only select the first 2 lines and press Ctrl + Shift + Enter to print the result of it:
Got it. Until JetBrains releases the source code or documents the API, it is going to take too much effort to implement this.
I dont think JetBrains team is seriously going to do it. It was request for several years
Unexpectedly but very good, now the feature I told you yesterday; "But in Rstudio, you can put your cursor at anywhere in the block code, Rstudio can recognized they all connected by the "pipe" now work with .py file as well. As long as the block of code are connected either inside the parathesis, or under the def, you can put your cursor any where to run it
But there is one issue, see this picture below for more detail. There are 2 block codes in the cell, but the action can only capture and run the first one only
Btw, in Jupyter lab you have the feature "Run selected line or highlighted text", I requested this feature for DataSpell for so long but they slowly working on it. Do you know any possible to have it?
Originally posted by @ntluong95 in https://github.com/guoci/pycharm-smart-execute/issues/1#issuecomment-1555970957