Vim icon indicating copy to clipboard operation
Vim copied to clipboard

`ctrl+i` or `command+i` for Copilot Chat

Open vinliao opened this issue 2 years ago • 17 comments

Is your feature request related to a problem? Please describe. EDIT: QUICK HACK (put this in your settings.json):

  "vim.visualModeKeyBindingsNonRecursive": [
    {
      "before": ["<C-i>"],
      "commands": ["interactiveEditor.start"]
    }
  ],
  "vim.normalModeKeyBindingsNonRecursive": [
    {
      "before": ["<C-i>"],
      "commands": ["interactiveEditor.start"]
    }
  ],

The default key to open Copilot Chat window (in-editor) is ctrl+i, when the extension is active, it doesn't work.

image

Describe the solution you'd like ctrl+i on normal or visual mode to open the same panel.

Describe alternatives you've considered Quick hack would be mapping ctrl+i on settings.json, unsure what the "open chat panel" command is exactly.

Additional context Add any other context or screenshots about the feature request here.

vinliao avatar May 13 '23 05:05 vinliao

I guess I could comment that on mac my cmd+i is working correctly, so this is for windows only.

PabloLION avatar May 18 '23 11:05 PabloLION

Having the same issue on Windows

rodrigomlpOz avatar Oct 06 '23 18:10 rodrigomlpOz

I got same issue on Windows too.

arrrmin avatar Oct 15 '23 14:10 arrrmin

Can we get a real fix for this please?

blanham avatar Oct 27 '23 20:10 blanham

I have the same issue on Linux too. I run Arch Linux with KDE Plasma as the Desktop Environment. Took me a while to figure out that it wasn't an issue related to my current windowing system and pre-configured keyboard shortcuts but the Vim plugin installed in VS Code. Disabling that fixes the issue. But I need Vim emulation active at the same time...so, yeah, if there is a way to have both the Vim plugin active and CTRL+I working so I can use Copilot Chat in-editor then that would be great.

dekarpaulvictor avatar Nov 02 '23 05:11 dekarpaulvictor

Seems the PR is not merged.

Any way to workaround it for now?

paulhybryant avatar Apr 08 '24 10:04 paulhybryant

Any estimate on when this fix going to be merged into the extension? I love Vim. I love VSCode. I love Github Copilot. I want to love them all together!

AndrewIzatt avatar May 05 '24 04:05 AndrewIzatt

According to #8767, here's a quick fix.

Use Ctrl + K Ctrl + S to open keyboard shortcuts setting. Them search "Ctrl+i", and there's a command called extension.vim_ctrl+i, whose source is Vim. Them add && vim.mode == 'Normal' to its When expression. That's, turning it into editorTextFocus && vim.active && vim.use<C-i> && !inDebugRepl && vim.mode == 'Normal'.

Now Copilot Inline Chat works in my circumstance.

pilgrimlyieu avatar May 06 '24 11:05 pilgrimlyieu

According to #8767, here's a quick fix.

Use Ctrl + K Ctrl + S to open keyboard shortcuts setting. Them search "Ctrl+i", and there's a command called extension.vim_ctrl+i, whose source is Vim. Them add && vim.mode == 'Normal' to its When expression. That's, turning it into editorTextFocus && vim.active && vim.use<C-i> && !inDebugRepl && vim.mode == 'Normal'.

Now Copilot Inline Chat works in my circumstance.

Thank you so much for your quick reply. I edited the "When" expression as you indicated. But this still isn't allowing me to enter Github Copilot chat. It does however enter "Insert" mode (which maybe is what you were trying to solve) but my issue is I'd like to be able to use Ctrl+i to use my Github Copilot chat feature. Any more help would be greatly appreciated.

AndrewIzatt avatar May 09 '24 03:05 AndrewIzatt

It does however enter "Insert" mode (which maybe is what you were trying to solve) but my issue is I'd like to be able to use Ctrl+i to use my Github Copilot chat feature. Any more help would be greatly appreciated.

Do you mean you want use Chat feature even in Normal mode? The Copilot Chat works when I'm in Insert mode or Visual mode because I still want to use Ctrl + I to move my cursor in Normal mode. If the key is useless for you, maybe you could disable or delete the binding. Hopefully I haven't misunderstood you.

{
    "key": "ctrl+i",
    "command": "-extension.vim_ctrl+i",
    "when": "..."
}

pilgrimlyieu avatar May 12 '24 05:05 pilgrimlyieu