All Projects → tom-doerr → vim_codex

tom-doerr / vim_codex

Licence: MIT license
This is a simple plugin for Vim that allows you to use OpenAI Codex.

Programming Languages

python
139335 projects - #7 most used programming language
Vim Script
2826 projects

Projects that are alternatives of or similar to vim codex

warning
Warning Tool for CodeX Editor 2.0
Stars: ✭ 15 (-91.71%)
Mutual labels:  codex
capella
Cloud service for image storage and delivery
Stars: ✭ 116 (-35.91%)
Mutual labels:  codex
Codex
A free note-taking software for programmers and Computer Science students
Stars: ✭ 242 (+33.7%)
Mutual labels:  codex
awesome-codex
A list dedicated to products, demos and articles related to 🤖 OpenAI's Codex.
Stars: ✭ 115 (-36.46%)
Mutual labels:  codex
inline-code
Inline-Code Tool for Editor.js 2.0
Stars: ✭ 32 (-82.32%)
Mutual labels:  codex
link
Link Tool for Editor.js 2.0
Stars: ✭ 61 (-66.3%)
Mutual labels:  codex
editorjs-style
Inline-style Tool for Editor.js
Stars: ✭ 23 (-87.29%)
Mutual labels:  codex
simple-image
Simple Image Tool for Editor.js 2.0
Stars: ✭ 36 (-80.11%)
Mutual labels:  codex
editorjs-inline
Inline-Editor.js Tool for Editor.js
Stars: ✭ 23 (-87.29%)
Mutual labels:  codex
language-planner
Official Code for "Language Models as Zero-Shot Planners: Extracting Actionable Knowledge for Embodied Agents"
Stars: ✭ 84 (-53.59%)
Mutual labels:  codex
zsh codex
This is a ZSH plugin that enables you to use OpenAI's Codex AI in the command line.
Stars: ✭ 787 (+334.81%)
Mutual labels:  codex
fix
Allows you to use OpenAI Codex to fix errors in the command line.
Stars: ✭ 72 (-60.22%)
Mutual labels:  codex

🤖 Vim Codex

An AI plugin that does the work for you.

Repository's starts Issues License

This is a simple plugin for Vim that will allow you to use OpenAI Codex. To use this plugin you need to get access to OpenAI's Codex API.

Installation

The easiest way to install the plugin is to install it as a bundle. For example, using Pathogen:

  1. Get and install pathogen.vim. You can skip this step if you already have it installed.

  2. cd ~/.vim/bundle

  3. git clone [email protected]:tom-doerr/vim_codex.git

Bundle installs are known to work fine also when using Vundle. Other bundle managers are expected to work as well.

After installing the plugin, you need to install the openai package::

pip3 install openai

After running :CreateCompletion once, the file ~/.config/openaiapirc is created where you need to enter your OpenAI authentication information. You can find your authentication information on the website.

Usage

The plugin provides a CreateCompletion command which you can call by default using the mapping <Leader>co. You can give the CreateCompletion command the number of tokens it should produce as an argument, e.g. CreateCompletion 1000. If you want to just complete the current line, run CreateCompletionLine.

To complete the current text from insert and normal mode using Ctrl+x, you can add the following lines to your .vimrc::

nnoremap  <C-x> :CreateCompletion<CR>
inoremap  <C-x> <Esc>li<C-g>u<Esc>l:CreateCompletion<CR>

Updating

Manually

In order to update the plugin, go to its bundle directory and use Git to update it:

  1. cd ~/.vim/bundle/vim_codex

  2. git pull

With Vundle

Use the :BundleUpdate command provided by Vundle, for example invoking Vim like this::

% vim +BundleUpdate

Traffic Statistics

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].