Replies: 5 comments 3 replies
-
Have you tried ctrl/cmd+Enter? That's what I always use to run single lines. |
Beta Was this translation helpful? Give feedback.
-
It's true that Positron currently doesn't have a button to run the current line/statement, but as @kv9898 points out, you can get at a similar action via the keyboard shortcut Cmd/Ctrl+Enter. You also can run selected code or the current statement in the console via the Or in the context menu you get by right-clicking: |
Beta Was this translation helpful? Give feedback.
-
I was just looking this up at this very moment, thanks for posting! Looks like there's also a "run selection in console" button in the little dropdown menu on the right side of the actions bar, but it requires clicking into the dropdown menu (screenshot below). Clicking the button itself (not the dropdown-menu-open part) sources the whole file. I was trying to figure out if there's a way to customize the bar to get that "run selection in console" option as a shortcut button right next to the "source" button like RStudio has. Sounds like a "not yet"? Would love this as a feature. I don't always want to use keyboard shortcuts for various reasons and I'm finding in the current UI I'm prone to accidentally clicking the source-whole-thing button itself and screwing myself up. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
I was looking for this same feature, and I'm really glad it exists, but I wish it could do just like RStudio where it shows line by line as they are executed. It makes it so much better for seeing where the output comes from, because sourcing the file will not even show the outputs (that are not inside a "print"), and running all lines in a file will show outputs but they come one after the other, in the console. In RStudio, you could have a big analysis file and every output would be shown underneath its code line in the terminal. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In RStudio, one of the best features was that clicking the "Run" icon would only run the line of code at the cursor. Positron seems to have done away with that and runs the whole script when clicking "Run".
Is there a setting to enable that? I did find where to enable the RStudio keymap, but does doesn't seem to include that. I poked around in discussions, but didn't see anything.
Is this an option I'm missing somewhere, or should I file a feature request?
Beta Was this translation helpful? Give feedback.
All reactions