An experimental Vim/Neovim inline-completion plugin backed by your ChatGPT subscription through the local Codex CLI. It does not use GitHub Copilot or an OpenAI API key.
-
Install Neovim or the latest patch of Vim (9.0.0185 or newer).
-
Install Node.js and the Codex CLI globally:
npm install -g @openai/codexCodex must be available as
codexin your PATH. You do not need to sign in separately: after installing this plugin,:Copilot setupstarts the ChatGPT device-code login flow inside Vim/Neovim. -
Install
nexxai/chatgpt.vimusing 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/nexxai/chatgpt.vim.git \ ~/.vim/pack/nexxai/start/chatgpt.vim -
Neovim, Linux/macOS:
git clone --depth=1 https://github.com/nexxai/chatgpt.vim.git \ ~/.config/nvim/pack/nexxai/start/chatgpt.vim -
Vim, Windows (PowerShell command):
git clone --depth=1 https://github.com/nexxai/chatgpt.vim.git ` $HOME/vimfiles/pack/nexxai/start/chatgpt.vim -
Neovim, Windows (PowerShell command):
git clone --depth=1 https://github.com/nexxai/chatgpt.vim.git ` $HOME/AppData/Local/nvim/pack/nexxai/start/chatgpt.vim
-
-
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.
Codex requests are more expensive and slower than a dedicated autocomplete service. The default 600 ms idle delay prevents a request for every keystroke.