DEV Community

Ollie Ridsdale for Shortcut Masters

Posted on

5 useful VSCode shortcuts for GitHub Copilot 🤖

If you're a Copilot user, you're probably already familiar with the shortcuts to accept (tab) and dismiss suggestions (esc).

But did you know about these 5 shortcuts? I've personally found them really useful.

1. Show next/previous inline suggestion

Demonstrates the shortcut in action, cycling through inline suggestions with copilot in the vscode editor

This shortcut lets you cycle forwards and backwards between different inline suggestions offered by Copilot

Mac: Option ⌥ + [ / Option ⌥ + ]
Windows & Linux: Alt + [ / Alt + ]

2. Trigger an inline suggestion

Demonstrates the shortcut in action, a copilot suggestion is triggered which looks like a predective suggestion inline in the vscode editor

This one is super useful if you accidentally dismiss a suggestion with esc, you can have Copilot trigger a new suggestion.

Mac: Option ⌥ + \
Windows & Linux: Alt + \

3. Open suggestions panel

Demonstrates the suggestion panel being popped open on shortcut press in the vscode editor

If cycling through shortcuts feels cumbersome, you might find this helpful. It opens all the suggestions in a panel where you can more easily review each one.

Mac: Control ⌥ + Enter ⏎
Windows & Linux: Ctrl + Enter ⏎

4. Open inline chat

demonstrates an inline chat popup appearing on shortcut press, it looks like a small text box hovering above the curosor which allows the user to input a command to copilot

Chat with Copilot inline in your code, Copilot will generate code right at your cursor position.

💡 This also works in the terminal, if you'd like guidance on how to do something there.

Mac: Command ⌘ + I
Windows & Linux: Ctrl + I

5. Start a new chat

Demonstrates a new copilot chat being created in the chat panel in the vscode editor

If you're already chatting with copilot in the chat panel, you can use this shortcut to quickly start a new chat.

Mac: Control ^ + L
Windows & Linux: Ctrl + L


and that's all five!💥. Hopefully you found those helpful.

Do you know any other shortcuts in VSCode or for Copilot? Let me know in the comments below, I'd love to hear about them.

Top comments (0)