18

Is there a shortcut key to complete the first line only?

enter image description here

here I wanted to autocomplete only the line line-height: 1.2;, but if I press the tab it will insert the whole suggested code including a new class below.

Since this happens a lot, is there a way only to complete the first line/ line by line?

:) Even looking at the image, don't you get an urge to complete the first line only?

ash
  • 1,065
  • 1
  • 5
  • 20
Abraham
  • 12,140
  • 4
  • 56
  • 92
  • https://github.com/github/feedback/discussions/7331 – Muhammet Can TONBUL Mar 13 '22 at 15:27
  • You can press ```ctrl``` + ```enter```, copilot usually suggest upto 10 solutions at a go, once you click that, you can accept anyone that fit your intent. – Ibrahim Hammed Mar 13 '22 at 16:06
  • 1
    Switch to IntelliJ, then you can use https://github.com/cmp-nct/Stewardess CTRL+ALT+D pressed two times and you'll have the first line completed without the garbage below. – John Oct 20 '22 at 15:40
  • 1
    We have forgotten one very small detail sir. I would understand your request if this was code but this is css so "how is the copilot supposed to read your mind and set the style properties you like, just based on the class name?". It can merely reproduce what it finds on other examples it has been trained on... – Cristian Dec 14 '22 at 12:04

3 Answers3

3

That is annoying, but the answer to your question seems to be no for the time being. Keep in mind that there are updates to the plugin very frequently, so there's still hope:)

laviRZ
  • 316
  • 1
  • 3
  • 11
  • Actually that has been one of the major complaints since the first technical preview was released privately and despite dozens of reports there was not one single response to it. The reason is likely Marketing, if people would only complete 1/3 of a line instead of 10 garbage lines then their official efficiency metric would collapse. So 1 year has passed. The plugins for copilot are all in a very basic state, minimal support with a lot of important features not implemented. – John Oct 20 '22 at 15:42
  • Is there an issue link which I can make noise on? – Rushi Agrawal Nov 05 '22 at 12:48
1

I'm on Jetbrains but same thing, it is extremely frustrating that there is no control over the completions. Right now it's not possible, you need to either take it all or write it yourself as before.

The reason for Github/Microsoft doing that with CoPilot is quite simple: Their #1 marketing strategy is how much more "efficient" their users are. They say 60% of the code is written by CoPilot.

What they do not say or track is that of those 60% users likely delete 95% afterward. In reality accepting a solution only means that you need a fraction of it, often it's wrong redundant and a multiple of what you want. But that would destroy their metrics.

I'd recommend making a bug report to the plugin developer and hope that enough people do it until it's fixed.

The other option is to hack the plugin itself, I looked into that and it can be done. Though I'm not too fond of that approach.

John
  • 7,507
  • 3
  • 52
  • 52
  • It was such a problem, I took 2 days to learn Kotlin, plugin development and wrote Stewardess: https://github.com/cmp-nct/Stewardess Stewardess completes copilot suggestions word-by-word – John Oct 20 '22 at 15:39
0

If you're using VSCode, I think it's Alt + \ to toggle inline suggestions, or at least that's what the docs say.Docs