This is just a experimental code. Not for practical use.
More useful version is on macrat/askgpt.vim.
-
Place
autoload-chatgpt.vim
to~/.vim/autoload/chatgpt.vim
. -
Write this to your vimrc:
command ChatGPT call chatgpt#Open()
" Replace XXXXX with your OpenAI API Key.
g:chatgpt_api_key = 'XXXXX'
-
Open chat buffer by
:ChatGPT
command. -
You can chat now!