Multiline editing #2117

Closed
opened 2026-02-16 17:34:14 -05:00 by yindo · 5 comments
Owner

Originally created by @jcubic on GitHub (Oct 15, 2025).

It seems not supported.

SHIFT+ENTER
CTRL+ENTER

Don't create a newline, only execute the prompt. Most chat based interfaces use SHIFT+ENTER to insert a newline.

It would be nice if OpenCode have this feature that is de facto standard.

a workaround is to copy/paste the newline.

Originally created by @jcubic on GitHub (Oct 15, 2025). It seems not supported. SHIFT+ENTER CTRL+ENTER Don't create a newline, only execute the prompt. Most chat based interfaces use SHIFT+ENTER to insert a newline. It would be nice if OpenCode have this feature that is de facto standard. a workaround is to copy/paste the newline.
yindo closed this issue 2026-02-16 17:34:14 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 15, 2025):

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

  • #3175: Have no ability to enter a new line - Reports that Option+Enter, Ctrl+Enter, and Shift+Enter are not working in 0.15.2
  • #2960: [BUG] Terminal TUI does not insert a new line with Shift+Enter; only Ctrl+J works - Same exact issue with Shift+Enter not working
  • #2820: How do you insert a new line into the prompt box? (using mac + ghostty) - User asking how to create line breaks, tried Ctrl+Enter, Opt+Enter, Cmd+Enter with no luck
  • #1505: shift+enter keybinding not working - Detailed technical analysis of why Shift+Enter doesn't work but Ctrl+J does
  • #344: New line does not work with Shift+Enter or Ctrl+j - Reports both Shift+Enter and Ctrl+J not working in TUI
  • #167: shift+enter on tmux not working - Shift+Enter sends request instead of creating newline in tmux
  • #20: Map shift+enter and alt+enter to new line - Early feature request for Shift+Enter support
  • #62: Feat: Support for shift+enter to create a new line - Another early feature request for Shift+Enter

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

@github-actions[bot] commented on GitHub (Oct 15, 2025): This issue might be a duplicate of existing issues. Please check: - #3175: Have no ability to enter a new line - Reports that Option+Enter, Ctrl+Enter, and Shift+Enter are not working in 0.15.2 - #2960: [BUG] Terminal TUI does not insert a new line with Shift+Enter; only Ctrl+J works - Same exact issue with Shift+Enter not working - #2820: How do you insert a new line into the prompt box? (using mac + ghostty) - User asking how to create line breaks, tried Ctrl+Enter, Opt+Enter, Cmd+Enter with no luck - #1505: shift+enter keybinding not working - Detailed technical analysis of why Shift+Enter doesn't work but Ctrl+J does - #344: New line does not work with Shift+Enter or Ctrl+j - Reports both Shift+Enter and Ctrl+J not working in TUI - #167: shift+enter on tmux not working - Shift+Enter sends request instead of creating newline in tmux - #20: Map shift+enter and alt+enter to new line - Early feature request for Shift+Enter support - #62: Feat: Support for shift+enter to create a new line - Another early feature request for Shift+Enter Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Oct 15, 2025):

We support shift + enter, some terminals send it differently than others tho. I think our capturing of it will be improved soon we are rewriting the tui to be more compatible everywhere.

This is a duplicate of https://github.com/sst/opencode/issues/1505

But can you tell me what emulator you are using @jcubic

@rekram1-node commented on GitHub (Oct 15, 2025): We support shift + enter, some terminals send it differently than others tho. I think our capturing of it will be improved soon we are rewriting the tui to be more compatible everywhere. This is a duplicate of https://github.com/sst/opencode/issues/1505 But can you tell me what emulator you are using @jcubic
Author
Owner

@jcubic commented on GitHub (Oct 15, 2025):

I use Xfce terminal, which uses VTE library from GNOME. If something doesn't work as expected on your end, you can report an issue on their Gitlab, you can also ask question if something is not working.

They were helpful when I reported an issue with flickering in some CLI applications.

@jcubic commented on GitHub (Oct 15, 2025): I use Xfce terminal, which uses [VTE library from GNOME](https://wiki.gnome.org/Apps/Terminal/VTE). If something doesn't work as expected on your end, you can report an [issue on their Gitlab](https://gitlab.gnome.org/GNOME/vte/-/issues), you can also ask question if something is not working. They were helpful when I reported an issue with [flickering in some CLI applications](https://gitlab.gnome.org/GNOME/vte/-/issues/2837).
Author
Owner

@Tmeister commented on GitHub (Oct 20, 2025):

Same issue here.

I'm having issues when working within a tmux session my setup is:

  • alacritty 0.16.1 (42f49eeb)
  • tmux 3.5a

When I run opencode in a regular Alacritty panel it works, if I start a new Tmux session the same keybidding doesn't work.

Hope this extra info helps.

@Tmeister commented on GitHub (Oct 20, 2025): Same issue here. I'm having issues when working within a tmux session my setup is: - alacritty 0.16.1 (42f49eeb) - tmux 3.5a When I run opencode in a regular Alacritty panel it works, if I start a new Tmux session the same keybidding doesn't work. Hope this extra info helps.
Author
Owner

@rekram1-node commented on GitHub (Oct 20, 2025):

@Tmeister I don't use tmux but I think someone provided a work around in linked issue

@rekram1-node commented on GitHub (Oct 20, 2025): @Tmeister I don't use tmux but I think someone provided a work around in linked issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2117