From 923746952c3d4794343f0505f4a6389fb6926bdb Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Sun, 2 Apr 2023 23:41:48 +0200 Subject: open chat command docu --- README.md | 31 +++++++++++++++++++++++++++++++ doc/vim-ai.txt | 3 +++ 2 files changed, 34 insertions(+) diff --git a/README.md b/README.md index 8900f2f..f92377c 100644 --- a/README.md +++ b/README.md @@ -105,6 +105,37 @@ nnoremap c :AIChat nnoremap r :AIRedo ``` + +### 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: -- cgit v1.2.3