Skip to content

feat: make tab switch and line-start rebindable - #57

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/keybindable-tabs-linestart-15fc
Aug 29, 2026
Merged

feat: make tab switch and line-start rebindable#57
cursor[bot] merged 1 commit into
mainfrom
cursor/keybindable-tabs-linestart-15fc

Conversation

@nicholasadamou

@nicholasadamou nicholasadamou commented Aug 29, 2026

Copy link
Copy Markdown
Member

Summary

Make tabs.next / tabs.prev and editor.lineStart rebindable via KEYBINDABLE + customCommands. Move Ctrl+Opt+B (line home) onto the global keymap so it works with the custom-command path.

Context

Remaining KEYBINDABLE leftovers from the druk→dune feature-gap pass. Rebased onto main after #54#56 merged.

Test plan

  • Unit/UI coverage in test/keybindings.test.tsx and existing test/line-edit.test.tsx Ctrl+Opt+B
  • CI green on rebased tip
Open in Web Open in Cursor 

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by CodeRabbit

  • New Features

    • Added configurable keyboard shortcuts for switching to the next or previous tab.
    • Added a configurable shortcut to move the cursor to the start of the current line.
    • Custom tab-switching shortcuts now take precedence over default key combinations.
  • Bug Fixes

    • Improved keyboard handling so configured shortcuts consistently perform the expected actions.

@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 5edd8d3a-d3e8-4db3-bd6d-8f112946c648

📥 Commits

Reviewing files that changed from the base of the PR and between e11b377 and 748409b.

📒 Files selected for processing (4)
  • src/app/commands/keybindings.ts
  • src/app/keyboard.ts
  • src/ui/editorKeymap.ts
  • test/keybindings.test.tsx

📝 Walkthrough

Walkthrough

The change adds configurable commands for next tab, previous tab, and line-start navigation. Keyboard fallbacks now respect custom bindings. The conflicting editor shortcut was removed, and tests cover persistence and line-start behavior.

Changes

Configurable keyboard navigation

Layer / File(s) Summary
Command registration and dispatch
src/app/commands/keybindings.ts, src/app/keyboard.ts
Registers tabs.next, tabs.prev, and editor.lineStart. Maps these commands to tab switching and lineHome dispatch.
Fallback shortcut behavior
src/app/keyboard.ts, src/ui/editorKeymap.ts
Adds the Ctrl+modified-B line-start fallback and makes tab fallbacks respect customized bindings. Removes the conflicting editor keymap handler.
Binding persistence and behavior tests
test/keybindings.test.tsx
Verifies persistence of the new bindings and confirms that a custom line-start binding moves the cursor to column 1.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant useAppKeyboard
  participant lineOp
  participant EditorStatus
  User->>useAppKeyboard: Press custom editor.lineStart binding
  useAppKeyboard->>lineOp: Dispatch lineHome
  lineOp->>EditorStatus: Update cursor position
  EditorStatus-->>User: Show Ln 1, Col 1
Loading

Suggested reviewers: cursoragent

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/keybindable-tabs-linestart-15fc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Advertise tabs.next/prev and editor.lineStart in KEYBINDABLE, route the
default chords through the global keymap so custom bindings win, and move
Ctrl+Opt+B off the editor-local keymap.

Co-authored-by: Nicholas Adamou <nicholasadamou@users.noreply.github.com>
@cursor
cursor Bot force-pushed the cursor/keybindable-tabs-linestart-15fc branch from 3475b53 to 748409b Compare August 29, 2026 12:29
@nicholasadamou
nicholasadamou marked this pull request as ready for review August 29, 2026 12:43
@cursor
cursor Bot merged commit 813279b into main Aug 29, 2026
6 of 7 checks passed
@cursor
cursor Bot deleted the cursor/keybindable-tabs-linestart-15fc branch August 29, 2026 12:43
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.

2 participants