quarto-dev / quarto-dev/quarto

Allow Ctrl+Enter to run selected inline code in Positron

Open
#931 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement vscode
Dominant language
TypeScript
Stars
645
Forks
62
Avg merge
17h 42m
Merged PRs (30d)
13

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Ctrl+Enter or run-selection command for Quarto .qmd documents and trace how selections are checked for executable cells. Reproduce the inline r a example in Positron, then verify the selected expression is sent to the active R console and returns [1] 1.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript
Domain
developer-experience
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.