This plugin brings chat gpt to Vim and NVim The purpose of this pugin is to assist you for your various development tasks.
- Chat with GPT (currently gpt3.5-turbo-16k) in a separate buffer. The output is in markdown.
- GPT can recall previous messages from the current session.
- GPT can execute Python and Lua code and interact with the editor.
- GPT can search the web (google, ddg, wikipedia) and read web pages content.
- Selected text/code is appended to the prompt.
- GPT is aware of the language of your current buffer.
- Multiple sessions. You can save a session and continue the conversation later if needed.
Requirement can be installed using the following command:
pip3 install -r requirements.txtPlug 'kamou/gpt-vim':call gpt#Assist(0)<cr> # Launch the prompt
:'<,'>call gpt#Assist(1)<cr> # Launch the prompt and append the current selection
:call gpt#List()<cr> # List saved conversations
nmap <silent> gpa <Plug>(gpt-vim-assist)
xmap <silent> gpa <Plug>(gpt-vim-assist-vis)
vmap <silent> gpa <Plug>(gpt-vim-assist-vis)
nmap <silent> gpl <Plug>(gpt-vim-conversations)
You may update it in you .vimrc file.
rreset current session memory, GPT will forget everything, the buffer will be cleared.qclose gpt buffer. Memory is kept untouched, gpt will recall previous (most recent) messages.ssave the current session history.Llist previously saved sessions (press enter to load selected session).cCancel the current stream. (The answer will be lost, and not saved in the database)BEnter Block Mode.
jCycle down to next fenced code block.kCycle up to next fenced code block.yCopy current block and leave Block Mode.
qclose the listddelete the session under the cursor<cr>select the session under the cursors: Open the conversation under the cursor in a horizontal split.v: Open the conversation under the cursor in a vertical split.

