opencode icon indicating copy to clipboard operation
opencode copied to clipboard

[FEATURE]: Add keybind to navigate between user messages

Open will-marella opened this issue 3 weeks ago • 2 comments

Feature hasn't been suggested before.

  • [x] I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Currently, navigating between user messages in long conversations is challenging. Page up/down scrolls incrementally, and it's easy to overshoot past your own messages when AI outputs are very long.

Proposed Solution: Add a configurable keybind that jumps directly to the previous/next user message in the chat. The feature would:

  1. Detect visible message boundaries in the viewport
  2. Snap directly to the nearest previous/next user message
  3. If the target message isn't visible yet, scroll by one viewport height to load more messages

My proposed solution snaps directly to the nearest previous/user message even for very long messages that are well out of user view.

Behavior:

  • If the user is at the most recent message, it will default to page down.
  • If at the end of scroll (no more space), it will have no effect.
  • Works smoothly with very long outputs (tested with 6000+ lines in VSCode and Ghostty)

Other details:

  • Keybind will default to "none" to avoid collisions with existing shortcuts
  • PR will included updated keybinds documentation for easy configuration

I have a working implementation ready and will submit a PR shortly.

will-marella avatar Dec 04 '25 19:12 will-marella

This issue might be a duplicate of existing issues. Please check:

  • #3337: Feature Request: Navigation Shortcut to Jump Between User Messages - This is the original feature request for jumping between user messages using keybinds (e.g., SHIFT+arrow keys)
  • #5029: Add keybinds to scroll to prev/next user message - A recently closed issue requesting messages_previous_user/messages_next_user keybinds for the same functionality

Feel free to ignore if this is a refinement or implementation of those feature requests.

github-actions[bot] avatar Dec 04 '25 19:12 github-actions[bot]

This!

Although I personally would prefer just having a keybinding for moving half a viewport up and down (like Ctrl + u or Ctrl + d does in vim).

danmondra avatar Dec 05 '25 22:12 danmondra