Suggestion: Better ergonomics for long text
Resolved 💬 16 comments Opened Feb 26, 2025 by aud Closed Jan 8, 2026
💡 Likely answer: A maintainer (ashwin-ant, collaborator)
responded on this thread — see the highlighted reply below.
Deleting/editing text after input:
Reproduction:
- Enter in a bunch of text
- See that it inserted a placeholder (
[Pasted text +11]for eg). - If you try to edit that, or if you're pasting in multiple blocks, it's non-obvious how to handle and breaks the insertion if you edit that special text directly.
Suggestions:
- Don't do smart truncation.
- If truncation is non-negotiable, make
[Pasted line +linecnt]some sort of special token that when you edit your prompt, it won't allow you to edit individual chars and instead force you to delete the whole _token_ (thus deleting the text).
$ claude
╭────────────────────────────────────────────────────╮
│ ✻ Welcome to Claude Code research preview! │
│ │
│ /help for help │
│ │
│ cwd: /Users/elliot/src/github.com/WithPage/page │
╰────────────────────────────────────────────────────╯
> This is a really long text file
This is a really long text file
This is a really long text file
This is a really long text file
[Pasted text +35
⏺ I need to help you with a text file, but I don't see an actual file that was pasted. Could you please share the file again or tell me what you'd like me to do with it?
\ to insert a newline is a bit awkward
Almost like this needs an insert vs. command mode, similar to the bash mode. If you can be inserted into edit mode and go wild on the prompt. Another idea could be to allow some sort of swapping configuration away from \ to something a bit more fluid like cmd+enter.
16 Comments
The first part is interesting feedback, thanks! We'll discuss our options here.
For the second part, are you using iTerm? If so, you can run
/terminal-setupand we'll automatically map Shift+Enter to newline. Would that work for you? Your idea of insert vs. command mode is interesting as well!Thanks for looking! I'm using
ghostty, not sure if there's an equivalent.For an
insertmode it could be as simple as@to enter insert mode (similar to bash mode) that gives you more predictable text editing rules (like enter = newline).M-Enter (esc followed by enter) would be also accepted for a new line in multi line. (like aider)
CTRL-J could also be accepted for a new line multi line. (like charmbracelet's gum cli tool)
Maybe /editor for opening in $EDITOR (like git commit msgs?)
+100 this. Entering mulit-line text in terminal is painful (WSL FWIW).
Even ctrl+enter to move to next line would be an improvment!
A shortcut to open up the prompt in temporary
$EDITORwindow would be super awesome.For me that would be Neovim. In Lazygit when writing a commit I can press <kbd>Ctrl-o e</kbd> and I have the ability to edit the git commit message in a normal sized, temporary Neovim Buffer. On
:wqit will close and commit. This type of flow would be super awesome for Claude Code.There are already Vim Keybindings for the prompt itself, but I can't really do much with it, since pressing <kbd>Esc</kbd> to enter Normal Mode conflicts with quiting claude entierly. This issue is already mentioned here: #39.
I am also using Ghostty and Mac btw. I did not get the <kbd>M-Enter</kbd> to work. I am just escaping it for every enter..
\<Enter>.#138 and #143 are near dupes.
New claude code user here. Not sure the best issue to put this, but on the multi-line support: this was one of the first things I looked for in the docs. I'm coming from Aider, which I found awkward for anything more than short single-line prompts, until I found its multi-line mode, which was a huge improvement.
It looks there are various dupes and feature requests for better multi-line support, or issues with the
/terminal-setupsolution, including: https://github.com/anthropics/claude-code/issues/138, https://github.com/anthropics/claude-code/issues/729, https://github.com/anthropics/claude-code/issues/1863 and https://github.com/anthropics/claude-code/issues/1203.From my POV, how Aider handles it is totally fine and aligned with UX conventions:
M-Enterfor this binding.$EDITOR.It would be great to have one chosen issue for tracking this feature request, as there's clearly some desire for it!
M in terminal can be mapped to option (alt), but then many keys become disabled in international keyboards, like @ or #
Was the
/terminal-setupremoved? It doesn't seem to be an available command for me with v1.0.31.I hope this feature must consider the usage environment of Windows users!!!!!
I don't know why support is the worst when over 90% of programmers are Windows users!!!
✅ Citations Implementation Complete
The end-to-end citation flow is now fully operational in us-east-1. All AI services are collecting citations, and the data pipeline is successfully storing them in the Aurora database.
What Was Implemented
1. Database Migration (us-east-1)
ai_model_responsestable2. Data Flattener Updates
aurora_flattener_lambda.pyto extract 5 citation fields from S3 resultscitation_quality_score(converts to NULL)scripts/aws/data_flattener/aurora_flattener_lambda.py(lines 297-304)3. Database Client Updates
aurora_data_api_client.pyto include citation columns in INSERT statementsscripts/aws/data_flattener/aurora_data_api_client.py(lines 379-384, 688-693)4. Lambda Deployment
Verified Results
Database Query Results (2025-10-21):
Citation Tracking View Results:
Database Schema
New Columns:
citationsJSONB - Full citation array from AI responsesweb_search_performedBOOLEAN - Whether web search was usedweb_search_timestampTIMESTAMP WITH TIME ZONE - When search occurredsearch_queriesTEXT[] - Search queries usednum_sourcesINTEGER - Number of sources consultedsearch_costDECIMAL(10,6) - Cost of web searchequal_experts_in_citationsBOOLEAN - Whether EE appears in citationscitation_quality_scoreDECIMAL(5,4) - Average citation relevance scorenum_citationsINTEGER - Count of citations in responseAnalysis Views:
v_citation_analysis- Citation quality ratings and metricsv_equal_experts_citation_tracking- EE citation rates by provider/model/datev_citation_source_analysis- Top citation sources and domainsMigration Script
Created
scripts/apply-citations-migration-simple.pyfor us-east-1 deployment.All AI services (OpenAI, Claude, Gemini, Grok, Perplexity) are now successfully collecting and storing citation data!
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.