From 4671e479df6db06b39bcd6ceaa4ad31782dda28d Mon Sep 17 00:00:00 2001 From: Carlos Gutierrez Date: Tue, 17 Feb 2026 00:18:18 -0500 Subject: [PATCH] docs: add transform-selection documentation - Add usage guide for ctt in Normal and Visual mode - Document insert at cursor vs replace selection behavior - Add queue waiting notification explanation - Update commands reference --- README.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/README.md b/README.md index e15a567..1a9db47 100644 --- a/README.md +++ b/README.md @@ -319,6 +319,7 @@ llm = { | `:Coder transform` | `:CoderTransform` | Transform all tags in file | | `:Coder transform-cursor` | `:CoderTransformCursor` | Transform tag at cursor | | - | `:CoderTransformVisual` | Transform selected tags | +| - | `:CoderTransformSelection` | Transform with prompt (insert/replace) | ### Conflict Resolution @@ -491,6 +492,52 @@ Write prompts using `/@` and `@/` tags: Use Tailwind CSS for styling @/ ``` +### Transform Selection (Quick Prompt) + +The `ctt` command opens a prompt window for quick code transformations without needing tag markers: + +#### Normal Mode (No Selection) +Press `ctt` in Normal mode to: +- Opens a prompt window +- Enter your request (e.g., "add a function to validate credit cards") +- Code will be **inserted at the current cursor line** + +#### Visual Mode (With Selection) +Select code in Visual mode and press `ctt` to: +- Opens a prompt window with your selection +- Enter your request (e.g., "add error handling") +- The **selected code will be replaced** with the generated code + +#### Usage Examples + +**Insert new code at cursor:** +```vim +# In Normal mode, cursor on line 10 +ctt +" Enter: add a function to parse ISO dates" +" Code inserted at line 10 +``` + +**Replace selected code:** +```vim +# In Visual mode, select lines 5-8 +ctt +" Enter: add try-catch and error handling" +" Selected lines 5-8 replaced with new code +``` + +**Queue Waiting** +If you're in Visual or Insert mode when the code is generated, you'll see a notification: +- "Queue waiting: exit Visual mode to inject code" +- Exit Visual mode to apply the changes + +#### Keymaps + +| Key | Mode | Description | +|-----|------|-------------| +| `ctt` | Normal | Open prompt to insert at cursor | +| `ctt` | Visual | Open prompt to replace selection | + ### Prompt Types | Keywords | Type | Behavior |