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_vimYou should also ensure that $HOME/.local/bin is in your $PATH.
mkdir -p ~/.qq
cp -pv conf.example ~/.qq/confConfigure 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:
- :newor- :vnewto open a new buffer.
- :qqqto load a fresh- qqtext file in the current buffer.
- Edit your prompt after the ^Q^Qescape chars.
- :qqto 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^Aescape chars. More^Q^Qescape chars are also appended at the end of the text file.
- Repeat (3)-(6).
MIT License