Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jessfraz/openai.vim
OpenAI GPT-3 plugin for vim.
https://github.com/jessfraz/openai.vim
Last synced: 15 days ago
JSON representation
OpenAI GPT-3 plugin for vim.
- Host: GitHub
- URL: https://github.com/jessfraz/openai.vim
- Owner: jessfraz
- Created: 2020-07-17T20:16:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-09-15T03:54:54.000Z (about 2 years ago)
- Last Synced: 2024-08-02T06:03:54.478Z (3 months ago)
- Language: Vim script
- Size: 3.42 MB
- Stars: 96
- Watchers: 4
- Forks: 14
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# openai.vim
A vim plugin for auto-completing a line of text with
[OpenAI's GPT-3 API](https://openai.com/blog/openai-api/).> **NOTE:** This was more like a fun experiment if you are looking for fully
> functional AI-powered completion check out
> [Codata](https://www.codota.com/)'s [TabNine Vim Plugin](https://www.tabnine.com/install/vim/).**Table of Contents**
- [Installation](#installation)
- [Usage](#usage)## Installation
This plugin follows the standard runtime path structure. Below are some helper lines
for popular package managers:* [Vim 8 packages](http://vimhelp.appspot.com/repeat.txt.html#packages)
* `git clone https://github.com/jessfraz/openai.vim.git ~/.vim/pack/plugins/start/openai.vim`
* [Pathogen](https://github.com/tpope/vim-pathogen)
* `git clone https://github.com/jessfraz/openai.vim.git ~/.vim/bundle/openai.vim`
* [vim-plug](https://github.com/junegunn/vim-plug)
* `Plug 'jessfraz/openai.vim'`
* [Vundle](https://github.com/VundleVim/Vundle.vim)
* `Plugin 'jessfraz/openai.vim'`You must have `curl` and `jq` installed locally, as well as `OPENAI_API_KEY` set
in your environment.## Usage
With your cursor on a line of text, or a selection of text in visual mode,
`:OpenAIComplete` will send the line of text or selection to the OpenAI API and
append the result in the lines following.Or you can use whatever your `` key is + `o` to complete the selection
or line.As seen in the gif below this is better for written words than code.
![demo](demo.gif)