This plugin is driven by GPT, so get Open AI's API key first.
Please reference Account API Kyes - OpenAI API page and generate your api key.
If you mange plugins with dein.vim and managing with toml file, then write config like below.
[[plugins]]
repo = 'takavfx/gptwriter.vim'
depends = 'denops.vim'
hook_add = '''
let g:gptwriter_key = '<openapi_key>' # Or you have to manage seprately for safety.
'''
GPTWriter writes response from GPT (ChatGPT) at the cursor in current buffer.
Execute GPTWrite
command with arg like this:
:GPTWrite <a sentence to write>
For example:
:GPTWrite think about shooting game
:GPTWriteFromSelected <(*Optional) operation words>
:GPTWriteFromWhole
Let GPT write the rest from activat entire buffer.
:GPTWriteTheRest <(*Optional) operation words>