Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ctrl+i or command+i for Copilot Chat #8418

Open
vinliao opened this issue May 13, 2023 · 10 comments
Open

ctrl+i or command+i for Copilot Chat #8418

vinliao opened this issue May 13, 2023 · 10 comments

Comments

@vinliao
Copy link

vinliao commented May 13, 2023

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.

@PabloLION
Copy link

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

@rodrigomlpOz
Copy link

Having the same issue on Windows

@arrrmin
Copy link

arrrmin commented Oct 15, 2023

I got same issue on Windows too.

@blanham
Copy link

blanham commented Oct 27, 2023

Can we get a real fix for this please?

@dekarpaulvictor
Copy link

dekarpaulvictor commented Nov 2, 2023

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.

HenryTSZ pushed a commit to HenryTSZ/NVim that referenced this issue Mar 1, 2024
@paulhybryant
Copy link

Seems the PR is not merged.

Any way to workaround it for now?

@AndrewIzatt
Copy link

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!

@pilgrimlyieu
Copy link

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.

@AndrewIzatt
Copy link

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.

@pilgrimlyieu
Copy link

pilgrimlyieu commented May 12, 2024

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": "..."
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants