gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Ctrl+Backspace to delete whole words from prompt

Open andyesys opened this issue 1 year ago • 9 comments

What would you like to be added?

Delete whole words with Ctrl+Backspace or Shift+Backspace.

Why is this needed?

It sometimes happens, that I accidentally paste wrong data or code into a prompt.

To remove that code I have to press or hold backspace which deletes every character one by one.

Unfortunately that is very slow for long text. I can usually in most shells and text editors delete whole words with Ctrl+Backspace or Shift+Backspace. That would speed up the process a lot.

I hope you consider this as a feature for upcoming releases. ❤️

Additional context

No response

andyesys avatar Jul 03 '25 07:07 andyesys

@andyesys you can use ctrl + w

Seydulla avatar Jul 03 '25 09:07 Seydulla

@Seydulla Ctrl+w is kind of not intuitive for me, but yes it works!

andyesys avatar Jul 03 '25 12:07 andyesys

@Seydulla Ctrl+w is kind of not intuitive for me, but yes it works!

which platform do you use?

Windows 11 (Command Prompt)

andyesys avatar Jul 03 '25 13:07 andyesys

Heya this seems like a nice change :) I would be interested to implement it if no one else is doing already!

devpool007 avatar Jul 03 '25 23:07 devpool007

So for some editors we definitely have a variant of this already which leads me to believe this is very editor specific. Marking as help wanted if someone wants to take a stab; however, I'd caution that there's some complexity in getting this right given terminal quirks.

NTaylorMullen avatar Jul 03 '25 23:07 NTaylorMullen

Hi @NTaylorMullen I guess in my head I oversimplified it haha. As I thought just adding Ctrl + Backspace combo in the text buffer file should work but I guess there is more to this. But are there such Input prompts setup specific to editors in the code? I couldn't find this.

devpool007 avatar Jul 04 '25 06:07 devpool007

Hi @NTaylorMullen I guess in my head I oversimplified it haha. As I thought just adding Ctrl + Backspace combo in the text buffer file should work but I guess there is more to this. But are there such Input prompts setup specific to editors in the code? I couldn't find this.

No not today. It's been a bit of a delicate balance of picking implementations that are platform agnostic and running with it. That being said I imagine the days aren't far off of needing to add very explicit terminal selection.

TO be fair, I could be wrong here, it could be simple, just tried to give a warning is all

NTaylorMullen avatar Jul 05 '25 22:07 NTaylorMullen

Is anyone looking into a review for #4432 ?

madhaven avatar Sep 29 '25 09:09 madhaven

Hello! As part of our effort to keep our backlog manageable and focus on the most active issues, we are tidying up older reports.

It looks like this issue hasn't been active for a while, so we are closing it for now. However, if you are still experiencing this bug on the latest stable build, please feel free to comment on this issue or create a new one with updated details.

Thank you for your contribution!

gemini-cli[bot] avatar Dec 03 '25 21:12 gemini-cli[bot]