Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple-line prompts #105

Closed
jiamingz42 opened this issue Jul 15, 2023 · 8 comments
Closed

Support multiple-line prompts #105

jiamingz42 opened this issue Jul 15, 2023 · 8 comments

Comments

@jiamingz42
Copy link

Sometimes I need to write multi-line prompt. My current workaround is to write the prompt in a text editor and copy them into aider.

The ideal solution is that when I hit ctrl+enter or cmd+enter, I can continue the edit the prompt.

@paul-gauthier
Copy link
Owner

Aider supports this using {} characters. See the tips section, which says:

Enter a multiline chat message by entering { alone on the first line. End the multiline message with } alone on the last line.

@paul-gauthier
Copy link
Owner

Also, in many terminal environments if you paste text with multiple lines into aider they will be received as a multi-line input. But this may not work in all terminal environments.

@tmm1
Copy link

tmm1 commented Jul 16, 2023

I also tried to use ctrl+enter. If that could be supported it would be nice.

@paul-gauthier
Copy link
Owner

Good idea. I asked aider to make that change though I had to manually switch the keybinding from ControlJ to the correct ControlM.

@paul-gauthier
Copy link
Owner

Actually, apparently prompt toolkit has no way to express "control+enter". So I switched it to esc-enter instead.

@jiamingz42
Copy link
Author

So I switched it to esc-enter instead.

Thanks for making the change! I upgrade to 0.9.0 but esc-enter doesn't work for me.

I think { and { will work for most case except if I need to paste some code snippet which should contains { at a single line. I can probably workaround it by put a leading space.

@joshuavial
Copy link
Contributor

It wasn't working for me either, then I realised it isn't in the 0.9.0 build and only in main
pip install --upgrade git+https://github.com/paul-gauthier/aider.git#egg=aider-chat will get you the version from the main branch

just remember to switch back to the last stable version if there are any issues
pip install --upgrade aider-chat==0.9.0

@kripper
Copy link

kripper commented Mar 11, 2024

#502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants