Active Copilot suggestions disable IdeaVim mode switching #7863
-
I am using Copilot in IntelliJ, alongside the IdeaVim plugin. When a Copilot suggestion is visible (greyed out ghost code before the suggestion is accepted with <tab>), the <esc> key rejects the suggestion. When using IdeaVim, one must frequently switch from insert mode to normal mode using the key. Since suggestions are often made when a line is finished being typed, this means that the <esc> key needs to be pressed twice to enter normal mode, which breaks with previous muscle memory of using vim. This has resulted in a number of situations where I try to move around or change a word after hitting <esc>, and find that the characters I'm pressing are being typed because I'm still in insert mode. My suggestion would be to have the first <esc> apply to the IdeaVim plugin, so that code editing using vim shortcuts is not interrupted by Copilot suggestions. Currently, if a suggestion is visible and one uses the arrow keys (still in insert mode) then the suggestion disappears. This functionality could be maintained in normal mode, where the first <esc> press moves from insert mode to normal mode, and any future key pressed (j/k to move down/up) would indicate that the Copilot suggestion should disappear, just like when the arrow keys are pressed for non-vim code navigation. IdeaVim version: 1.8.1 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 43 replies
-
This was bothering me too. You can work around it quite easily by modifying the keyboard shortcut for Github Copilot -> Hide Completions in Editor from the default value of escape. I updated it to cmd+escape, so it's still easy to dismiss the suggestions, but it no longer interferes with vim mode escape to normal mode. |
Beta Was this translation helpful? Give feedback.
-
I can at least say that I've seen interleaved results multiple times (i.e. 1 character real, 1 character copilot, 1 character real, 1 character copilot ... repeat for a full line). |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
This was bothering me too. You can work around it quite easily by modifying the keyboard shortcut for Github Copilot -> Hide Completions in Editor from the default value of escape. I updated it to cmd+escape, so it's still easy to dismiss the suggestions, but it no longer interferes with vim mode escape to normal mode.