[Feature Request] Add “Paste w/o executing newlines” (treat \n as text)

Resolved 💬 4 comments Opened Sep 16, 2025 by codeflyA Closed Dec 31, 2025
💡 Likely answer: A maintainer (tibo-openai, collaborator) responded on this thread — see the highlighted reply below.

What feature would you like to see?

Background

When pasting multiline text (e.g., code snippets, prompt templates, or structured parameters) into input fields, editors, or terminals, the current behavior often interprets newline characters as execute/send triggers, or splits the content into multiple commands. This leads to accidental runs, broken formatting, or premature submissions.

What I want

Introduce an alternative paste mode where newlines are treated strictly as text. Optionally, add a mode to escape newlines (replace them with literal \n).

Use cases

Pasting a multiline prompt into a chat input without auto-sending.

Pasting multiline commands into a REPL/terminal, but reviewing them before executing.

Pasting structured text (e.g., JSON, regex, scripts) with embedded newlines that should remain intact or be escaped.

Expected behavior

Provide configurable paste modes (via shortcut, context menu, or settings):

A. Single-line paste: Replace \r?\n with a space.

B. Escaped paste: Replace real newlines with literal \\n (optionally escape \t as \\t).

C. No-exec paste: Preserve newlines exactly but guarantee that no auto-send/a

Are you interested in implementing this feature?

_No response_

Additional information

_No response_

View original on GitHub ↗

4 Comments

heheda123123 · 11 months ago

have the same problem .

Perlover · 10 months ago

Same too

tibo-openai collaborator · 10 months ago

Are you all on windows?

etraut-openai contributor · 7 months ago

This is related to https://github.com/openai/codex/issues/2137, which affects some Windows users. A new feature shouldn't be necessary here, so I'm going to close this feature request.