Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

@ibetitsmike ibetitsmike commented Nov 12, 2025

Changed interrupt stream keybind strategy to be vim-mode aware:

  • Vim mode enabled: Ctrl+C (always interrupts, regardless of text selection)
  • Vim mode disabled: Esc (intuitive cancel/stop key)

This provides the most natural behavior for each mode while avoiding conflicts with standard operations.

Vim Mode Behavior

In vim mode, Ctrl+C always interrupts streams - consistent with vim philosophy:

  • Ctrl+C is for canceling/interrupting (like in terminal)
  • Standard Ctrl+C copy is not available in vim mode
  • Use vim yank commands (y, yy, yiw, etc.) for copying instead
  • Provides consistent interrupt behavior whether text is selected or not

Non-Vim Mode Behavior

In non-vim mode:

  • Esc interrupts streams (intuitive cancel key)
  • Ctrl+C works normally for copy operations
  • Simple and predictable behavior

Changes

  • Split INTERRUPT_STREAM into INTERRUPT_STREAM_VIM and INTERRUPT_STREAM_NORMAL
  • Updated useAIViewKeybinds to accept vimEnabled and select appropriate keybind
  • Removed text selection checking in vim mode - Ctrl+C always interrupts
  • Updated all UI components to display the correct keybind hint
  • Updated documentation in docs/vim-mode.md

Generated with cmux

Ctrl+C conflicts with the standard copy shortcut on Linux and Windows.
Changed interrupt stream keybind to Ctrl+D on these platforms while
keeping Ctrl+C on macOS (where Cmd+C is used for copy).

_Generated with `cmux`_
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Changed interrupt stream keybind strategy to be vim-mode aware:
- Vim mode enabled: Ctrl+C (familiar from terminal interrupt)
- Vim mode disabled: Esc (intuitive cancel/stop key)

This avoids conflicts with copy operations while providing the most
natural keybind for each mode. In vim mode, Ctrl+C still allows
copy when text is selected. In non-vim mode, Esc is free for
interrupt since it's not needed for mode transitions.

_Generated with `cmux`_
@ibetitsmike ibetitsmike changed the title 🤖 fix: change interrupt stream keybind to Ctrl+D on Linux/Windows 🤖 fix: vim-aware interrupt keybinds (Ctrl+C in vim, Esc otherwise) Nov 12, 2025
In vim mode, Ctrl+C now always interrupts streams regardless of text
selection. This is consistent with vim philosophy where:
- Ctrl+C is for canceling/interrupting operations
- Yank commands (y, yy, yiw, etc.) are used for copying

This simplifies the behavior and makes it more predictable. Users in
vim mode will use vim's native copy commands instead of Ctrl+C.

_Generated with `cmux`_
@ibetitsmike ibetitsmike added this pull request to the merge queue Nov 12, 2025
Merged via the queue into main with commit a8c2ad5 Nov 12, 2025
20 of 21 checks passed
@ibetitsmike ibetitsmike deleted the ctrl-c-interrupt branch November 12, 2025 18:08
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.

1 participant