copilot - MarekBykowski/readme GitHub Wiki

Copilot needs vim 9.1>

Install latest vim

git clone https://github.com/vim/vim.git
cd vim
./configure \
   --with-features=huge \
   --enable-multibyte \
   --enable-python3interp=yes \
   --enable-luainterp=yes \
   --enable-perlinterp=yes \
   --enable-rubyinterp=yes \
   --enable-cscope \
   --enable-gui=no \
   --prefix=/usr/local; \
make -j"$(nproc)"
sudo make install

Install copilot

sudo apt-get install nodejs npm

Install it via Pathogen

cd ~/.vim/bundle
git clone https://github.com/github/copilot.vim.git

Run it

Inside Vim:

:Copilot setup

Vim shows a GitHub login URL -> Open it in a browser -> Paste the code -> Done ✅

:Copilot status

Install copilot CLI

curl -fsSL https://gh.io/copilot-install | bash

Basic Usage

Copilot shows gray inline suggestions while you type.

  • Accept / Reject
    • Accept suggestion → Tab
    • Reject → Esc

Cycle suggestions:

  • Alt-] " next suggestion
  • Alt-[ " previous suggestion

(Some terminals use Ctrl-] / Ctrl-[.)

Useful commands

:Copilot enable
:Copilot disable
:Copilot status
:Copilot panel
:Copilot panel

Tab Key Conflict Fix (very common)

If Tab is already used for indent/completion, remap accept:

imap <silent><script><expr> <C-J> copilot#Accept("\<CR>")

Now accept suggestions with:

Ctrl + J
⚠️ **GitHub.com Fallback** ⚠️