ai.vim icon indicating copy to clipboard operation
ai.vim copied to clipboard

Docs: Add info on what region of code is being evaluated

Open chrisgrieser opened this issue 2 years ago • 1 comments

in normal mode and insert mode, it is not entirely clear to me what region of code is being evaluated. Is it the line, the paragraph? Knowing this would be relevant to effectively use this plugin

chrisgrieser avatar Dec 13 '22 11:12 chrisgrieser

When running :AI with no arguments (such as when pressing <C-a> in insert mode), up to 20 lines before and after the cursor are included in the request to OpenAI to give context. You can adjust this by setting g:ai_context_before and g:ai_context_after.

aduros avatar Dec 13 '22 16:12 aduros