explaingit

github/copilot.vim

11,600Vim ScriptAudience · developerComplexity · 2/5Setup · moderate

TLDR

The official Vim and Neovim plugin for GitHub Copilot, which shows AI-generated code completions inline as you type and lets you accept them with the Tab key.

Mindmap

mindmap
  root((copilot.vim))
    What it does
      AI code completion
      Inline suggestions
      Tab to accept
    Requirements
      GitHub subscription
      Node.js
      Vim or Neovim
    Use Cases
      Faster coding
      Boilerplate generation
      Any language
    Platforms
      Linux
      macOS
      Windows
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Get AI-powered inline code suggestions as you write in Vim or Neovim across any programming language.

USE CASE 2

Accept full function or block completions with a single Tab key press without leaving the editor.

USE CASE 3

Connect Vim or Neovim to GitHub Copilot on Linux, macOS, or Windows through a standard plugin manager.

Tech stack

Vim ScriptNode.js

Getting it running

Difficulty · moderate Time to first run · 30min

Requires a GitHub Copilot subscription (free tier available) and Node.js installed on your machine.

In plain English

Copilot.vim is an official plugin that brings GitHub Copilot into the Vim and Neovim text editors. GitHub Copilot is an AI coding assistant that watches what you type and suggests completions, ranging from single lines to entire functions. It was trained on a large amount of publicly available code and can produce suggestions in many programming languages. To use it, you need a GitHub Copilot subscription (a free tier is available), a recent version of Vim or Neovim, and Node.js installed on your machine. Installation is done through any standard Vim plugin manager, or manually by cloning the repository into your editor's plugin folder. After that, running the setup command from inside the editor connects it to your GitHub account. Once active, suggestions appear inline as you type and can be accepted by pressing the tab key. The plugin works on Linux, macOS, and Windows. Further help and configuration options are available through the editor's built-in help system by running the help command for copilot.

Copy-paste prompts

Prompt 1
I just installed copilot.vim with vim-plug. Walk me through running :Copilot setup and authenticating with my GitHub account.
Prompt 2
How do I configure copilot.vim in my Neovim init.lua to only show suggestions for Python and JavaScript files, not Markdown?
Prompt 3
What keybindings does copilot.vim set by default, and how do I remap Tab-to-accept to a different key like Ctrl+J?
Prompt 4
Copilot.vim is showing suggestions but I want to cycle through multiple alternatives instead of accepting the first one, what commands do that?
Open on GitHub → Explain another repo

← github on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.