REditorSupport / REditorSupport/vscode-R

Treat multiline command as one block in R Console history

Open
#1,666 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
TypeScript
Stars
1.2k
Forks
139
Avg merge
2h 46m
Merged PRs (30d)
5

Description

Is your feature request related to a problem? Please describe.

If we send a multiline command to the console, e.g.:

table(
  warpbreaks$wool,
  warpbreaks$tension
)

And then press up arrow in R console, we only get the last line (i.e. )).

RStudio, Positron, and ESS give the entiere command, which is very convenient.

This is discussed e.g. here: https://stackoverflow.com/q/16226216

Describe the solution you'd like

Treat multiline command as one block in R Console history, i.e. get the full command as in RStudio, Positron, and ESS when pressing up arrow.

Describe alternatives you've considered

Not tried in radian (cannot be easily installed on my work computer). Plus I prefer to stick with upstream R console.

Additional context

Would be very useful for multiline pipe commands too!

Contributor guide

Open the contributing guide

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 with the R Console history behavior reached by pressing the Up Arrow, using the multiline command example and the linked Stack Overflow discussion as context. Trace how a submitted multiline command is stored and retrieved, then verify that Up Arrow returns the complete command as one history block, including multiline pipe commands.

Written by the indexing model from the issue text.

Assessment

Tech stack
r, typescript, vscode
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.