aduros / ai.vim

Generate and edit text in Neovim using OpenAI and GPT.
ISC License
293 stars 24 forks source link

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

Open chrisgrieser opened 1 year ago

chrisgrieser commented 1 year ago

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

aduros commented 1 year ago

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.