Closed m-pauper closed 1 year ago
It's been renamed quarto.runCurrent
I thought so and renamed the runSelection
in those lines to runCurrent
but now pressing alt+enter
runs the entire cell, not only the current line.
Okay, I'll take a closer look too see what the problem might be!
I think I see the issue. In the last release we wanted to make our keyboard shortcuts better align with Jupyter notebooks (as many of our users will be switching between notebooks and qmds). In notebooks, there isn't a default command/keyboard shortcut to run a single line (you always run the whole cell). So we changed the behavior of Cmd+Enter
to run the cell rather than the line. We also added Shift+Enter
which does the same and advanced to the next cell (same as Jupyter).
That said, I do think that a line at a time is still potentially valuable so we should have a way to do it. We could bind Alt+Enter
to run line (as you did). The only downside of this is that is the Jupyter Notebook shortcut for "run cell and insert a new cell below"). So we'd fail to be compatible in that way but gain line-by-line execution.
Note that for Knitr we will execute line by line (as unlike Jupyter that is the default behavior in RStudio).
New command added here: https://github.com/quarto-dev/quarto/commit/292eab14438252e397a4c0d9881138c9a09aca9d
Thank you so much!
Hello. May you please bring back the old functionality "runSelection"? I was not only running single lines while developing but also running single code parts. e.g. a variable name. So the variable was displayed.
I also select multiple lines and let them run. this is not possible anymore unfortunately
Indeed, the new runLine
works great but cannot run a selection of x lines, only single lines. This is problematic especially when you split long lines of code to multiple lines. Submitting only one often results in an error in the interactive interpreter.
Okay, in version 1.105.0 of the extension we have now brought back the original "quarto.runSelection" command (bound to Alt+Enter
).
Cmd+Enter
will execute the entire cell (if in Jupyter, to match notebook UIs) or line/selection (if in Knitr, to match RStudio UI)
Hello,
In my VS Code
keybindings.json
I had included the following:which allowed me to send and execute the current line in the editor to the interactive session by pressing
alt+enter
. It used to work fine.Today I noticed that when I tried it, VS Code says the command does not exist anymore:
Was it deprecated?
Thanks for any help!