Bringing GitHub Copilot Chat to Vim
Hi there! My name is Dan and I wanted to share a plugin that I've been working on to bring Copilot functionality into vim. As someone who doesn't like being forced into VSCode all the time I really wanted to stay in my editor of choice and still be able to interact with Copilot Chat. As a weirdo who prefers gvim/vim > nvim there was no option. I built copilot-chat.vim to keep myself out of VSCode / fully transitioning to nvim Why copilot-chat.vim? Originally I forked tpope/github's copilot.vim repo and added the basic chat ability into that but quickly pivoted to my own plugin after realizing that PRs are closed to the original copilot.vim repo (uses Copilot LSP to to inline code completion). Since the nvim community has a CopilotChat.nvim plugin that is already well established my goal is to mirror the functionality of that but written in Vimscript. Key Features (Without the Bloat) Simple Chat Interface: No fancy dependencies, just run :CopilotChatOpen and you're talking to Copilot. Practical Prompt Templates: Add > TEMPLATE_NAME to automatically expand templates anywhere in your prompt: > explain function validateUser() { // code to validate } The template expands before sending, saving you from typing the same instructions repeatedly. Chat History: :CopilotChatSave to store your chats as JSON files. :CopilotChatLoad with fuzzy find for easy lookup and reload. Model Selection: Run :CopilotChatModels to switch between available AI models. I'd love to hear from other Vim users about what you'd like to see in this plugin / if you'd like to contribute I'm always accepting help from any other vimscript folks.

Hi there! My name is Dan and I wanted to share a plugin that I've been working on to bring Copilot functionality into vim. As someone who doesn't like being forced into VSCode all the time I really wanted to stay in my editor of choice and still be able to interact with Copilot Chat. As a weirdo who prefers gvim
/vim
> nvim
there was no option.
I built copilot-chat.vim to keep myself out of VSCode / fully transitioning to nvim
Why copilot-chat.vim
?
Originally I forked tpope/github's copilot.vim repo and added the basic chat ability into that but quickly pivoted to my own plugin after realizing that PRs are closed to the original copilot.vim repo (uses Copilot LSP to to inline code completion). Since the nvim community has a CopilotChat.nvim
plugin that is already well established my goal is to mirror the functionality of that but written in Vimscript.
Key Features (Without the Bloat)
-
Simple Chat Interface: No fancy dependencies, just run
:CopilotChatOpen
and you're talking to Copilot. -
Practical Prompt Templates: Add
> TEMPLATE_NAME
to automatically expand templates anywhere in your prompt:
> explain
function validateUser() {
// code to validate
}
The template expands before sending, saving you from typing the same instructions repeatedly.
Chat History:
:CopilotChatSave
to store your chats as JSON files.:CopilotChatLoad
with fuzzy find for easy lookup and reload.Model Selection: Run
:CopilotChatModels
to switch between available AI models.
I'd love to hear from other Vim users about what you'd like to see in this plugin / if you'd like to contribute I'm always accepting help from any other vimscript folks.