diff options
| author | Martin Bielik <mx.bielik@gmail.com> | 2023-04-02 23:41:48 +0200 |
|---|---|---|
| committer | Martin Bielik <mx.bielik@gmail.com> | 2023-04-02 23:41:48 +0200 |
| commit | 923746952c3d4794343f0505f4a6389fb6926bdb (patch) | |
| tree | a46f23be735677fad6c01c3dc7173d28290057a2 | |
| parent | b209554bf26d4662d126aa664875fd91dc803f62 (diff) | |
| download | vim-ai-923746952c3d4794343f0505f4a6389fb6926bdb.tar.gz | |
open chat command docu
Diffstat (limited to '')
| -rw-r--r-- | README.md | 31 | ||||
| -rw-r--r-- | doc/vim-ai.txt | 3 |
2 files changed, 34 insertions, 0 deletions
@@ -105,6 +105,37 @@ nnoremap <leader>c :AIChat<CR> nnoremap <leader>r :AIRedo<CR> ``` + +### Interface configuration + +Default interface configuration: + +```vim +let g:vim_ai_chat = { +\ "ui": { +\ "open_chat_command": "below new | call vim_ai#MakeScratchWindow()", +\ }, +\} +``` + +Tips: + +```vim +" restore conversation from the file +let g:vim_ai_chat = { +\ "ui": { +\ "open_chat_command": "below new /tmp/last_conversation.aichat", +\ }, +\} + +" open chat in a new tab +let g:vim_ai_chat = { +\ "ui": { +\ "open_chat_command": "tabnew | call vim_ai#MakeScratchWindow()", +\ }, +\} +``` + ### Completion configuration Request to the OpenAI API can be configured for each command. diff --git a/doc/vim-ai.txt b/doc/vim-ai.txt index d0519fd..d9c3eeb 100644 --- a/doc/vim-ai.txt +++ b/doc/vim-ai.txt @@ -66,6 +66,9 @@ Options: > \ "temperature": 1, \ "request_timeout": 10, \ }, + \ "ui": { + \ "open_chat_command": "below new | call vim_ai#MakeScratchWindow()", + \ }, \} Check OpenAI docs for more infomration: |