copilot.vim README

The project's README from github.com/github/copilot.vim. As one markdown file: README.md.

GitHub Copilot for Vim and Neovim

GitHub Copilot is an AI pair programmer tool that helps you write code faster and smarter. Trained on billions of lines of public code, GitHub Copilot turns natural language prompts including comments and method names into coding suggestions across dozens of languages.

Copilot.vim is a Vim/Neovim plugin for GitHub Copilot.

To learn more, visit https://github.com/features/copilot.

Getting access to GitHub Copilot

To access GitHub Copilot, an active GitHub Copilot subscription is required. Sign up for GitHub Copilot Free, or request access from your enterprise admin.

Getting started

  1. Install Neovim or the latest patch of Vim (9.0.0185 or newer).

  2. Install Node.js. If you use a package manager, make sure to install NPM as well (e.g., apt install nodejs npm on Debian/Ubuntu).

  3. Install github/copilot.vim using vim-plug, lazy.nvim, or any other plugin manager. Or to install manually, run one of the following commands:

    • Vim, Linux/macOS:

      git clone --depth=1 https://github.com/github/copilot.vim.git \
        ~/.vim/pack/github/start/copilot.vim
      
    • Neovim, Linux/macOS:

      git clone --depth=1 https://github.com/github/copilot.vim.git \
        ~/.config/nvim/pack/github/start/copilot.vim
      
    • Vim, Windows (PowerShell command):

      git clone --depth=1 https://github.com/github/copilot.vim.git `
        $HOME/vimfiles/pack/github/start/copilot.vim
      
    • Neovim, Windows (PowerShell command):

      git clone --depth=1 https://github.com/github/copilot.vim.git `
        $HOME/AppData/Local/nvim/pack/github/start/copilot.vim
      
  4. Start Vim/Neovim and invoke :Copilot setup.

Suggestions are displayed inline and can be accepted by pressing the tab key. See :help copilot for more information.

Troubleshooting

We’d love to get your help in making GitHub Copilot better! If you have feedback or encounter any problems, please reach out on our feedback forum.

copilot.vim (github/copilot.vim)

Searching Database…

这是什么?Copilot.vim 是 GitHub Copilot 的官方 Vim/Neovim 插件。GitHub Copilot 是一款 AI 结对编程工具,能根据注释和函数名给出代码补全建议。
这是独立应用,还是编辑器的插件?它是一款编辑器插件,把 GitHub Copilot 的 AI 建议直接集成到 Vim 或 Neovim 中,你在输入时会以内联方式显示建议。
我需要订阅 GitHub Copilot 吗?需要。你必须拥有有效的 GitHub Copilot 订阅(提供免费版),或者具备企业管理员权限;另外还需要在本地安装 Node.js。
安装时有哪些需要注意的坑?你需要较新的 Vim(9.0.0185 或更高版本)或 Neovim,并且必须先单独安装 Node.js 和 npm,插件才能正常工作。
这个插件在 Linux、macOS 和 Windows 上都能用吗?可以。README 中分别给出了 Linux/macOS 和 Windows(PowerShell)的明确安装命令。
如何触发和接受建议?Copilot 会在你输入时以内联形式显示建议,按 Tab 键即可接受。
Copilot.vim 免费使用吗?插件本身免费,但使用它需要有效的 GitHub Copilot 订阅。该订阅提供免费版,或者可通过企业途径获得。
Creator
github
Size
69.6 MB
Stars
11.7K
Updated
CommitJan 09
Age
4y
Commits · 90 Days