Skip to content

juliusolson/gpt.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

gpt.nvim

Very much a work in progress still.

Installation

External dependencies: curl

" Using vim-plug:
Plug 'juliusolson/gpt.nvim'
-- using lazy
require("lazy").setup({
    "juliusolson/gpt.nvim"
})

You also need to have an OpenAI API key accessible as an env variable

# .bashrc/.bash_profile
export OPENAI_API_KEY="<your-key>"

Usage

Edit selected text

  1. Highlight text in visual mode
  2. Run :GPTEDIT <instruction>
  3. The edited text replaces the highlighted text

Generate text

  1. Run :GPTGEN <prompt-here>
  2. The generated text is inserted at the cursors current location

Completion

  1. Run :GPTCOMP
  2. All text in the buffer up until the current cursor position is sent to the model and is used to generate a completion.
  3. The completion is inserted at the cursors current location

Releases

No releases published

Packages

No packages published

Languages