Add duplicate-line and scroll-without-moving-cursor shortcuts - #4254
Open
NisargJasani0602 wants to merge 1 commit into
Open
Add duplicate-line and scroll-without-moving-cursor shortcuts#4254NisargJasani0602 wants to merge 1 commit into
NisargJasani0602 wants to merge 1 commit into
Conversation
NisargJasani0602
requested a deployment
to
e2e-tests
August 13, 2026 23:35 — with
GitHub Actions
Waiting
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #4222 — adds two of the "easy" tier bindings identified
in the Sublime keymap gap analysis there, per @khanniie's suggestion
to tackle that tier next.
Shift-Ctrl-D/Shift-Cmd-D: duplicate the current line, usingCodeMirror's existing
copyLineDowncommand.Ctrl-Up/Down(Ctrl-Alt-Up/Downon Mac, matching Sublime's actualMac binding): scroll the viewport by one line without moving the
cursor.
Ctrl-J(join lines) is intentionally left out — it has noCodeMirror 6 built-in and would need custom logic, so deferring it to
a smaller, separate follow-up rather than scope-creeping this PR.
Note: this PR only adds the keybindings themselves. Updating
KeyboardShortcutModal.jsxto document them (along with the brokenReplace shortcut and #4222's move-line shortcut) is tracked separately
in #4253.
Test plan
npm run lintpassesnpm test -- client/modules/IDE/components/EditorpassesShift-Ctrl-Dduplicates the current line;
Ctrl-Up/Downscrolls the viewportwithout moving the cursor/selection
I have verified that this pull request:
npm run lint)npm run test)npm run typecheck)developbranch.Fixes #123