Skip to content

Allow Ctrl+Enter to run selected inline code in Positron #931

@AlexLietard

Description

@AlexLietard

When working in Quarto (.qmd) documents in Positron, Ctrl+Enter only executes code inside code chunks. If code is written in the markdown body (inline code), selecting it and pressing Ctrl+Enter results in the error message:

"Editor selection is not within an executable cell."

In RStudio, selecting R code anywhere in an R Markdown or Quarto document and pressing Ctrl+Enter sends the selection to the R console. This makes exploratory work and inline calculations much faster.

Request

Allow Ctrl+Enter (or the equivalent run-selection command) to send selected inline code to the active console.

Example

image

If the cursor is inside the inline expression r a, pressing Ctrl+Enter should send a to the console and return: [1] 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions