zed icon indicating copy to clipboard operation
zed copied to clipboard

Shortcut for accepting completions partially (word by word)

Open cdc-lst opened this issue 1 year ago • 4 comments

Check for existing issues

  • [X] Completed

Describe the feature

In addition to the "Accept completion" shortcut, it would be helpful to have a shortcut to accept partial completions, i.e. accept completions word by word. For example, in VS Code and IntelliJ IDEA, this is done using Cmd+Right Arrow (on Mac).

If applicable, add mockups / screenshots to help present your vision of the feature

No response

cdc-lst avatar Feb 19 '24 16:02 cdc-lst

This is a super cool suggestion! Didn't know this was possible in other editors.

JosephTLyons avatar Feb 20 '24 19:02 JosephTLyons

@JosephTLyons, do tags assistant, autocompletions satisfy this issue, so that people can also find it?

I will also add text to search by keywords

Accept Next Word Of Inline Suggestion editor.action.inlineSuggest.acceptNextWord https://code.visualstudio.com/updates/v1_74#_command-to-partially-accept-inline-completions

sirenkovladd avatar Feb 27 '24 19:02 sirenkovladd

@JosephTLyons, do tags assistant, autocompletions satisfy this issue, so that people can also find it?

I will also add text to search by keywords

Accept Next Word Of Inline Suggestion editor.action.inlineSuggest.acceptNextWord https://code.visualstudio.com/updates/v1_74#_command-to-partially-accept-inline-completions

As per your suggestion, I added autocompletions, which makes sense - thanks. :)

We use the assistant tag specifically for Zed's assistant panel, which is different from Copilot.

JosephTLyons avatar Feb 28 '24 14:02 JosephTLyons

I looked into this issue and it seems pretty straightforward to implement because most of the functionality already exists. But I'm struggeling with the keybindings a bit. I replaced the cmd-right shortcut with a new function. That way ctrl-e and end won't trigger the partial completion. But on Linux this shortcut, doesn't seem to exist. I will open a pr. Then it's easier to discuss changes and ideas.

jdk-21 avatar Mar 01 '24 15:03 jdk-21