Preserve Prompt on Ctrl+C #1479

Open
opened 2026-02-16 17:31:10 -05:00 by yindo · 2 comments
Owner

Originally created by @qwerty-turbo on GitHub (Aug 24, 2025).

Originally assigned to: @adamdotdevin on GitHub.

As a proud Neovim user like myself, I am super used to Vim motions, they run through my veins, every keystroke feels powerful. But when I open OpenCode and start writing a prompt, I feel weak. I keep hitting Ctrl+C to go to normal mode, but it just deletes my whole prompt with no way to get it back. That feels bad.

It’d be nice if Ctrl+C cleared the prompt but saved it in history, so pressing the up arrow brings it back. Then if I send a new prompt, that old one can just get wiped. Something like that.

Originally created by @qwerty-turbo on GitHub (Aug 24, 2025). Originally assigned to: @adamdotdevin on GitHub. As a proud Neovim user like myself, I am super used to Vim motions, they run through my veins, every keystroke feels powerful. But when I open OpenCode and start writing a prompt, I feel weak. I keep hitting `Ctrl+C` to go to normal mode, but it just deletes my whole prompt with no way to get it back. That feels bad. It’d be nice if `Ctrl+C` cleared the prompt but saved it in history, so pressing the up arrow brings it back. Then if I send a new prompt, that old one can just get wiped. Something like that.
Author
Owner

@github-actions[bot] commented on GitHub (Aug 24, 2025):

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

  • #183: Make ctrl+c close open pane before closing opencode - discusses different Ctrl+C behavior
  • #1764: Feature request: edit mode vim - requests vim keybindings in prompt editing
  • #314: history_previous and history_next keybinds not working - about history navigation functionality
  • #1701: Feature request: history reverse search like curses-based TUIs - about enhanced history search/access
  • #2067: Prompt History gets overwritten when working on multiple projects - about prompt history preservation

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Aug 24, 2025): This issue might be a duplicate of existing issues. Please check: - #183: Make ctrl+c close open pane before closing opencode - discusses different Ctrl+C behavior - #1764: Feature request: edit mode vim - requests vim keybindings in prompt editing - #314: history_previous and history_next keybinds not working - about history navigation functionality - #1701: Feature request: history reverse search like curses-based TUIs - about enhanced history search/access - #2067: Prompt History gets overwritten when working on multiple projects - about prompt history preservation Feel free to ignore if none of these address your specific case.
Author
Owner

@panta82 commented on GitHub (Dec 18, 2025):

You can press arrow up to go back to previous prompts.

@panta82 commented on GitHub (Dec 18, 2025): You can press arrow up to go back to previous prompts.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1479