Accepting next word of the suggestion ( Ctrl+Right Arrow )

Hello,

I’ve been using Cursor for some time. It has some issues; most of them are not a big deal, but one thing is a significant inconvenience. Let me explain… In Copilot++, when it shows a suggestion, you can press Tab to accept it all at once - so, accepting all or nothing. On the other hand, in GitHub Copilot, you can press Ctrl+Right Arrow to accept just the next word, and, of course, you can press it a few times to accept part of the suggestion.

Why is this important…

Suggestions are usually appropriate at the beginning but tend to be inaccurate somewhere in the middle. Accepting suggestions word by word gives you the ability to correct the suggestion where it’s wrong and then continue.

Please take a look at the attached GIF; it’s recorded using GitHub Copilot.

For me, the lack of this feature in Copilot++ is a show stopper/deal breaker. I would appreciate it a lot if you could add this.

rightArrow

13 Likes

+1

I provide a use case:

for example, sometimes, copilot++ give you a suggest is

ABCDEFG

if you TAB, you accept all of them, but if you only want to ABCD, you only can do this:

  • accept all, and delete the section you don’t want .
  • discard all the suggestion.

so is there some better solution?

1 Like

+1

This is also a deal breaker for me, really like the suggestions of co-pilot++ but we need to have some way to accept partial suggestions also like Github Co-pilot using Cmd+Right.

+1. I thought this was already implemented, but buggy with my Vim setup.

1 Like

Also when we accept Copilot++ suggestion, the cursor often ends up in the middle of the accepted code block/line. It may be better to place it at the end of the accepted code when we accept the suggestion (by clicking Tab) so that Shift + clicking on the point from which the suggestion should be removed + Backspace sequence would work after that.

2 Likes

Huge +1. I’m still using Github Copilot for this reason. Apart from the convenience of only getting the parts I want, accepting suggestions word by word also helps me keep track of which lines I’ve checked. I’m forgetful, so i don’t like to take the risk of accepting a block of code and forgetting to check it all.

+1, turns out after 3 months of using ctrl+right arrow, it is now my muscle memory and not having it is greatly slowing me down in cursor :frowning:

I really want to use Cursor but if it makes me slower I will have to switch back to VSCode :frowning:

You should be able to do this in Cursor now (on version 0.34)! Let me know if it isn’t working for you

1 Like

Hi, thanks for the quick response!
I tried to get it to work with copilot++, but ctrl+right only moves the cursor to the next line without accepting any part of the inline suggestion. I also noticed that alt + \ also does not work, but that is less of an issue for my workflow.

Here is a recording, I’m pressing ctrl+right: https://stackchk.fail/Cursor_uVEoqGCfdf.mp4

Version: 0.34.4
VSCode Version: 1.89.1
Commit: 3de6e97f4e691bf47fd93b963716eba3b5df7da0
Date: 2024-06-01T04:42:43.247Z
Electron: 28.2.8
ElectronBuildId: undefined
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Windows_NT x64 10.0.22631

The only extensions I have enabled atm are Pylance and Python.

I thought it might have been the VIM plugin, but I disabled that and it is still an issue.

If it matters, this is a remote session over SSH.

And here are my VSCode settings:

Same, Ctrl right arrow moves the cursor to the next line, it doesn’t accept the next word of the suggestion. I’m on Ubuntu.

For me, on macOS, CMD+right will always accept the next word even if I remove the keybinding, and also even when using CMD+ALT+right when I try to switch editor tabs. This is very inconvenient.

Please see this bug: Can not prevent CMD+right from triggering accept partial completion

Can we swap bugs XD

2 Likes

Hello
This feature started to work in Cursor v0.35.0 ( cursor-0.35.0x86_64.AppImage ) which WAS awesome :slight_smile:

Bu it is BROKEN again in v0.35.1 :frowning:

I have switched back to v0.35.0

Needs to be enabled in the settings now! It was interfering with normal keyboard navigation for some people. You can go to Cursor Settings > Features > Copilot++ to enable it.

2 Likes

You have to enable this. It works now
image

5 Likes

What should i put in the when statement of the keybinding, I want the right button to accept suggestion only when there is a suggestion to autocomplete and the default when statement does not work

cppSuggestion && !editorReadonly || inlineSuggestionVisible && !editorReadonly

1 Like

I just save with the same settings as user keyword and now it works

awesome solution

super thx. super.