How to select part of a copilot suggestion?

已回答

I just installed the github copilot plugin and am really impressed by how it seems to understand the business logic of my code and even my very personal idiosyncratic (at least I used to think so) ways of writing code.

But I haven't yet decided if I like it because often its suggestions feel more like a nuisance. But I think this has more to do with UI design than quality of the suggestions.

One thing I notice is that the first few "words" of the suggestion are usually helpful, but copilot gets the rest wrong. I would be nice if there was a way to point to the exact location where things started going wrong. For example, Cmd+mouse click at the end of the last word that is correct. But I haven't found a way to do that.

Interestingly enough, when I asked ChatGPT how to do that, it suggested that I should

  • Accept the solution
  • Edit the part that is wrong

But in most cases where the part that is wrong is say, 10x longer than the few words (say, 5) it got right, the time required to identify and select the long part of text that was wrong is longer than the type it would take me to type the correct section from scratch.

 

1

GitHub Copilot plugin is developed and maintained by GitHub so it worth reporting issues and requests to CoPilot's bug tracker

0

Since GitHub doesn't seem to be doing anything about this, I've gone ahead and implemented a plugin that adds a shortcut to accept Copilot's suggestions word by word: https://plugins.jetbrains.com/plugin/22838-copilot-word-by-word

0

请先登录再写评论。