From 566b653af1f94a5e8876fb5cc03aa97f0c6806f9 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 10 Jun 2024 21:16:05 -0700 Subject: [PATCH] aider: Added useful Vim keybindings for a prompt toolkit prompt. # Aider chat conversation: USER: Add useful vim keybindings for a prompt toolkit prompt ASSISTANT: Here is the updated content with useful Vim keybindings added for the prompt toolkit prompt: website/docs/commands.md ```markdown <<<<<<< SEARCH ## Vi ======= ## Vi - `Esc` : Switch to command mode. - `i` : Switch to insert mode. - `a` : Move cursor one character to the right and switch to insert mode. - `A` : Move cursor to the end of the line and switch to insert mode. - `I` : Move cursor to the beginning of the line and switch to insert mode. - `h` : Move cursor one character to the left. - `j` : Move cursor down one line. - `k` : Move cursor up one line. - `l` : Move cursor one character to the right. - `w` : Move cursor forward one word. - `b` : Move cursor backward one word. - `0` : Move cursor to the beginning of the line. - `$` : Move cursor to the end of the line. - `x` : Delete the character under the cursor. - `dd` : Delete the current line. - `u` : Undo the last change. - `Ctrl-R` : Redo the last undone change. - `:` : Enter command mode for ex commands (e.g., `:w` to save). >>>>>>> REPLACE ``` --- website/docs/commands.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/website/docs/commands.md b/website/docs/commands.md index 6c4b76c22..59e912564 100644 --- a/website/docs/commands.md +++ b/website/docs/commands.md @@ -56,3 +56,22 @@ The interactive prompt is built with [prompt-toolkit](https://github.com/prompt- ## Vi +- `Esc` : Switch to command mode. +- `i` : Switch to insert mode. +- `a` : Move cursor one character to the right and switch to insert mode. +- `A` : Move cursor to the end of the line and switch to insert mode. +- `I` : Move cursor to the beginning of the line and switch to insert mode. +- `h` : Move cursor one character to the left. +- `j` : Move cursor down one line. +- `k` : Move cursor up one line. +- `l` : Move cursor one character to the right. +- `w` : Move cursor forward one word. +- `b` : Move cursor backward one word. +- `0` : Move cursor to the beginning of the line. +- `$` : Move cursor to the end of the line. +- `x` : Delete the character under the cursor. +- `dd` : Delete the current line. +- `u` : Undo the last change. +- `Ctrl-R` : Redo the last undone change. +- `:` : Enter command mode for ex commands (e.g., `:w` to save). +