positron icon indicating copy to clipboard operation
positron copied to clipboard

Run selected code/line in Jupyter notebook

Open ntluong95 opened this issue 1 year ago • 2 comments

I would like to ask for the feature to run only selected text/line in Jupyter notebook

In Google Colab, you have the option to run only selected code/line by pressing Ctrl + Shift + Enter. Here I just highlighted only "flights" and run, so it showed the dataframe, not the result of "1+1" image

ntluong95 avatar Jul 02 '24 13:07 ntluong95

@nstrayer would it be appropriate to add this this to one of the Jupyter Keymap issues #2357 or #3014?

juliasilge avatar Jul 02 '24 15:07 juliasilge

Hmm, If I'm not mistaken this is a special feature of colab so it isn't getting us back to parity with plain jupyter notebooks (as those issues are about doing) but taking us beyond. Worth adding as a feature request though. I agree it's a nice feature.

nstrayer avatar Jul 02 '24 19:07 nstrayer

@ntluong95 have you used VSCode's "Run cell by line" feature? If that were available in Positron, would that work for you instead?

seeM avatar Jul 03 '25 08:07 seeM

No I have not. I think it is of the debugging mode rather than come as nature in normal .py file

ntluong95 avatar Jul 03 '25 08:07 ntluong95