copilot - MarekBykowski/readme GitHub Wiki
Copilot needs vim 9.1>
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
sudo apt-get install nodejs npm
Install it via Pathogen
cd ~/.vim/bundle
git clone https://github.com/github/copilot.vim.git
Inside Vim:
:Copilot setup
Vim shows a GitHub login URL -> Open it in a browser -> Paste the code -> Done ✅
:Copilot status
curl -fsSL https://gh.io/copilot-install | bash
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-[.)
:Copilot enable
:Copilot disable
:Copilot status
:Copilot panel
:Copilot panel
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