This is a simple vim "plugin", based on a couple of Python scripts and a little bit of vimrc, for interacting with chat completion endpoints from within the ergonomic comfort of vim.
cat vimrc.example >> ~/.vimrc
mkdir -p ~/.local/bin
cp -pv qq_vim.py ~/.local/bin/_qq_vim
cp -pv qqq_vim.py ~/.local/bin/_qqq_vim
You should also ensure that $HOME/.local/bin
is in your $PATH
.
mkdir -p ~/.qq
cp -pv conf.example ~/.qq/conf
Configure endpoint API tokens either via environment variables
(e.g. $DEEPSEEK_API_KEY
, $ANTHROPIC_API_KEY
, $TOGETHER_API_KEY
, etc.)
or via text files located in ~/.qq/api_tokens
.
In vim:
:new
or:vnew
to open a new buffer.:qqq
to load a freshqq
text file in the current buffer.- Edit your prompt after the
^Q^Q
escape chars. :qq
to submit your context window to a chat completions endpoint (default model: DeepSeek-V3).- Wait a little bit.
- The current buffer will auto reload to display the new context
window, with the assistant response after the
^A^A
escape chars. More^Q^Q
escape chars are also appended at the end of the text file. - Repeat (3)-(6).
MIT License