Skip to content

"insert code cell" splits cell if cursor inside - #1086

Open
vezwork wants to merge 3 commits into
mainfrom
fix/insert-code-cell-split
Open

"insert code cell" splits cell if cursor inside#1086
vezwork wants to merge 3 commits into
mainfrom
fix/insert-code-cell-split

Conversation

@vezwork

@vezwork vezwork commented Aug 12, 2026

Copy link
Copy Markdown
Member

Fixes #382

Kapture.2026-08-12.at.14.52.30.mp4

Improves the "insert code cell" functionality to split cell when cursor is inside, or insert cell above when cursor is at top. Also splits three ways when there is a selection (not shown in video).

Tested in both VSCode and Positron.

Design considerations

  • An LLM looked up the RStudio source code for "insert code cell" as the reference implementation for this feature. The functionality should match RStudio.

  • I lowered the background highlighting delay ms in this PR from 250ms to 50ms because 250s looked disorientingly jarring when splitting code cells. I don't know how reasonable this is to do, but it seems much nicer in general if people's computers can handle it. RStudio has very fast background highlighting so its nice if the experience in VSCode and Positron can try to match that.

@posit-snyk-bot

posit-snyk-bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@vezwork
vezwork requested a review from juliasilge August 12, 2026 19:08
@vezwork vezwork changed the title make it so "insert code cell" splits code cell with cursor inside "insert code cell" splits code cell if cursor inside Aug 12, 2026
@vezwork vezwork changed the title "insert code cell" splits code cell if cursor inside "insert code cell" splits cell if cursor inside Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code extension: "insert code cell" behavior from inside a code cell

2 participants