diff options
| author | Martin Bielik <mx.bielik@gmail.com> | 2023-03-24 17:52:35 +0100 |
|---|---|---|
| committer | Martin Bielik <mx.bielik@gmail.com> | 2023-03-24 17:52:35 +0100 |
| commit | 232419deba9643800658d92607bd32c6648c5db9 (patch) | |
| tree | 36da41141a5fb3c7f92e1fa4b3866f84565940bb | |
| parent | 08036fb76c437b705d916708d903c7c6c2eef0ba (diff) | |
| download | vim-ai-232419deba9643800658d92607bd32c6648c5db9.tar.gz | |
added keybindings to help
| -rw-r--r-- | README.md | 5 | ||||
| -rw-r--r-- | doc/vim-ai.txt | 19 |
2 files changed, 22 insertions, 2 deletions
@@ -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 <leader>a :AI<CR> xnoremap <leader>a :AI<CR> ``` @@ -148,8 +149,8 @@ xnoremap <leader>s :AIEdit fix grammar and spelling and use formal language<CR> nnoremap <leader>s :AIEdit fix grammar and spelling and use formal language<CR> " key binding to trigger chat -xnoremap <leader>c :AIChat <CR> -nnoremap <leader>c :AIChat <CR> +xnoremap <leader>c :AIChat<CR> +nnoremap <leader>c :AIChat<CR> " command with custom context (vim-ai functions: AIRun, AIEditRun, AIChatRun) command! -range -nargs=? AICode <line1>,<line2>call AIRun(<range>, "Programming syntax is " . &filetype . ", " . <f-args>) 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 <leader>a :AI<CR> + xnoremap <leader>a :AI<CR> + + " edit text with custom context + xnoremap <leader>s :AIEdit fix grammar and spelling<CR> + nnoremap <leader>s :AIEdit fix grammar and spelling<CR> + + " trigger chat + xnoremap <leader>c :AIChat<CR> + nnoremap <leader>c :AIChat<CR> + + " command with custom context (vim-ai functions: AIRun, AIEditRun, AIChatRun) + command! -range -nargs=? AICode <line1>,<line2>call AIRun(<range>, "Programming syntax is " . &filetype . ", " . <f-args>) + ABOUT *vim-ai-about* Contributions are welcome on GitHub: |