From 232419deba9643800658d92607bd32c6648c5db9 Mon Sep 17 00:00:00 2001 From: Martin Bielik Date: Fri, 24 Mar 2023 17:52:35 +0100 Subject: added keybindings to help --- README.md | 5 +++-- doc/vim-ai.txt | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1009a37..a483d8b 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,7 @@ Supported chat roles are **`>>> system`**, **`>>> user`** and **`<<< assistant`* Map keys in your `.vimrc` to trigger `:AI` command. ```vim +" complete text on the current line or in visual selection nnoremap a :AI xnoremap a :AI ``` @@ -148,8 +149,8 @@ xnoremap s :AIEdit fix grammar and spelling and use formal language nnoremap s :AIEdit fix grammar and spelling and use formal language " key binding to trigger chat -xnoremap c :AIChat -nnoremap c :AIChat +xnoremap c :AIChat +nnoremap c :AIChat " command with custom context (vim-ai functions: AIRun, AIEditRun, AIChatRun) command! -range -nargs=? AICode ,call AIRun(, "Programming syntax is " . &filetype . ", " . ) diff --git a/doc/vim-ai.txt b/doc/vim-ai.txt index 5657756..24a1ebe 100644 --- a/doc/vim-ai.txt +++ b/doc/vim-ai.txt @@ -84,6 +84,25 @@ a selection of options: > \ }, \} +KEY BINDINGS + +Examples how configure key bindins and customize commands: > + + " complete text on the current line or in visual selection + nnoremap a :AI + xnoremap a :AI + + " edit text with custom context + xnoremap s :AIEdit fix grammar and spelling + nnoremap s :AIEdit fix grammar and spelling + + " trigger chat + xnoremap c :AIChat + nnoremap c :AIChat + + " command with custom context (vim-ai functions: AIRun, AIEditRun, AIChatRun) + command! -range -nargs=? AICode ,call AIRun(, "Programming syntax is " . &filetype . ", " . ) + ABOUT *vim-ai-about* Contributions are welcome on GitHub: -- cgit v1.2.3