https://github.com/igrep/prompt.md.vim
Commands and functions to help you compose and submit long prompts as a markdown file to a CLI/TUI based coding agent. Currently, it supports only Claude Code.
https://github.com/igrep/prompt.md.vim
Last synced: 4 months ago
JSON representation
Commands and functions to help you compose and submit long prompts as a markdown file to a CLI/TUI based coding agent. Currently, it supports only Claude Code.
- Host: GitHub
- URL: https://github.com/igrep/prompt.md.vim
- Owner: igrep
- License: apache-2.0
- Created: 2025-05-29T23:19:41.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-09T13:01:48.000Z (11 months ago)
- Last Synced: 2025-07-29T03:07:47.472Z (11 months ago)
- Language: Vim Script
- Homepage:
- Size: 23.4 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prompt.md.vim
Commands and functions to help you compose and submit long prompts as a markdown file (`*.prompt.md` file) to a CLI/TUI based coding agent. Currently, it supports only Claude Code so far.
## Provided Functions
### Composing Prompts
- `prompt_md#send_at_this_path()`:
- Put `@` at the last `*.prompt.md` file.
- `prompt_md#send_at_this_path_with_hash_line_and_open_to_prompt()`:
- Put `@#` at the last `*.prompt.md` file.
- `prompt_md#send_word()`:
- Put `` at the last `*.prompt.md` file.
- `prompt_md#send_selection()`:
- Put the selected lines (if no lines are selected, the entire buffer) at the last `*.prompt.md` file and switch to it.
- `prompt_md#send(string)`:
- Put the argument `string` at the last `*.prompt.md` file and switch to it.
- `prompt_md#open_prompt()`:
- Open the last `*.prompt.md` file.
#### `*_and_open_prompt()` Variants
- `prompt_md#send_at_this_path_and_open_prompt()`:
- Put `@#` at the last `*.prompt.md` file, then switch to the `*.prompt.md` file.
- `prompt_md#send_at_this_path_with_hash_line_and_open_prompt()`:
- Put `@#` at the last `*.prompt.md` file, then switch to the `*.prompt.md` file.
- `prompt_md#send_word_and_open_prompt()`:
- Put `` at the last `*.prompt.md` file, then switch to the `*.prompt.md` file.
- `prompt_md#send_selection_and_open_prompt()`:
- Put the selected lines (if no lines are selected, the entire buffer) at the last `*.prompt.md` file, then switch to the `*.prompt.md` file.
- `prompt_md#send_and_open_prompt(string)`:
- Put the argument `string` at the last `*.prompt.md` file, then switch to the `*.prompt.md` file.
### Submitting Prompts
**NOTE**: Against their names, these functions only paste the contents of the last `*.prompt.md` file to the coding agent, it does not submit it. You need to hit the `Enter` to submit it.
- `prompt_md#submit()`:
- Send the contents of the last `*.prompt.md` file to the coding agent and switch to its buffer.
- `prompt_md#submit_selection()`:
- Send the selected lines of the buffer to the coding agent and switch to its buffer.
- NOTES:
- This function is available even if the opened file is not a `*.prompt.md` file. Because its target is not the last `*.prompt.md` file.
- If no lines are selected, it raises an error.
## Compatibility
This plugin is written in plain-old Vim script, but I tested it only on Neovim and it depends on several Neovim-specific terminal functions. Feel free to send a pull request if you want to make it compatible with Vim.