Intellij Github Copilot accept one line of several
Asked Answered
S

3

5

Is there a simple way, key shortcut or so, to accept part of a copilot suggestion? It would be intuitivt to have e.g. alt arrow forward to accept word by word, or alt tab for the entire line.

But I can only get it to either accept the entire multiline suggestion (tab) or nothing.

S answered 20/1, 2023 at 11:52 Comment(1)
i am using Intellij, Copilot is useful but would be far better if I could select part of the suggestion, maybe with the arrows to select the part I wantHerminiahermione
U
6

This appears to be available in the plugin now. In your IDE, see

Settings > Keymap > Plugins > GitHub Copilot >

  • Copilot: Apply Next Line of Completion to Editor
  • Copilot: Apply Next Word of Completion to Editor

Screenshot of JetBrains IDE Settings dialog, with Keymap > Plugins > GitHub Copilot selected

Urien answered 9/5, 2024 at 18:9 Comment(0)
B
2

The copilot team is currently exploring partial suggestions, I'd recommend that you keep an eye on the GitHub public product roadmap, our Changelog and our GitHub Blog for future updates.

Bidget answered 20/1, 2023 at 21:29 Comment(2)
Visual Studo Code has got it by now (with Ctrl + Right), can we please get it for IntelliJ soon?Siskin
I just noticed that Ctrl + RightArrow is working in Rider as wellHubbub
I
2

This feature is enabled by default on VS Code but unfortunately it has not been added to the Jetbrain plugins.

Currently the only way to achive this is by using a live-plugin.

This is how you can use it:

1.install the livePlugin from Jetbrain Marketplace and see the instruction of how to use it here: https://github.com/dkandalov/live-plugin

2.Install Stewardess live-plugin from this repository: https://github.com/cmp-nct/Stewardess/

3.Check the "Run plugins on IDE start" in live-plugin options.

The default key combination for word by word completion is "CTRL+ALT+D". If you wish to change it you can go to the plugin code, line 591 and change it there. I changed it to "meta alt E" which is Command+Option+e on Mac.

registerAction(id = "Stewardess_call", keyStroke = "meta alt E")
Impanation answered 14/8, 2023 at 14:26 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.