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

Allow option modifier to jump and delete words on macOS

Open saadjs opened this issue 1 year ago • 7 comments

Describe the feature or problem you'd like to solve

It would be great if the Copilot CLI supported standard word-wise navigation and deletion in input prompts, like Option + →/← to move by word and Option + Delete to delete by on macOS.

Proposed solution

No response

Example prompts or workflows

No response

Additional context

No response

saadjs avatar Sep 26 '25 01:09 saadjs

Thanks for the suggestion. Related: #45

SteveSandersonMS avatar Sep 26 '25 14:09 SteveSandersonMS

Few other shortcuts that are common and would be great to have:

  • Ctrl+U to erase the line
  • ~~Ctrl+A to go to beginning of the prompt~~
  • ~~Ctrl+E to go to end of the prompt~~

saadjs avatar Sep 27 '25 00:09 saadjs

Hey @saadjs! Word-wise navigation should already work with Option+<arrow> key. Are you not seeing that work? Also, CTRL+A and CTRL+E should also work for navigating to the beginning or end of the line, and Option+<forward delete> should delete the next word. If you're seeing issues with these, I'd love to know, since they seem to work for me on macOS.

That said, per #69, I can definitely see that option+delete isn't properly working.

lostintangent avatar Sep 27 '25 03:09 lostintangent

@lostintangent Word-wise navigation with opt+<arrow> is workin as expected, and both ctrl+A and ctrl+E are functioning correctly. Shortcuts that aren’t working from the list are opt+delete and ctrl+U.

saadjs avatar Sep 27 '25 20:09 saadjs

@lostintangent Word-wise navigation with opt+<arrow> is workin as expected, and both ctrl+A and ctrl+E are functioning correctly. Shortcuts that aren’t working from the list are opt+delete and ctrl+U.

Awesome, thanks for confirming that 🙏

lostintangent avatar Sep 27 '25 22:09 lostintangent

Testing on version 0.0.365 ctrl+u deletes the whole line, but opt+delete is still not working.

pierre-leroux-12 avatar Dec 03 '25 08:12 pierre-leroux-12

Version 0.0.417 fixed the word deletion issue. Its release notes say "Alt+backspace correctly registers as backspace instead of delete".

tuomastik avatar Feb 26 '26 19:02 tuomastik