fix: buffer handling

This commit is contained in:
2024-12-29 16:39:58 +01:00
parent 40c9d5672d
commit 162ab2d820
3 changed files with 61 additions and 26 deletions

View File

@@ -43,15 +43,15 @@ token_limit: 3000
## Usage
1. **`:ChatGPT`**
- If `interactive_file_selection` is on, youll pick directories to include.
- A buffer `ChatGPT_Prompt.md` opens to type your instructions.
- Save & close with `:wq` If `enable_chunking` is on and the prompt exceeds `token_limit`, its split into multiple chunks. Each chunk is opened in a buffer, and the first one is copied to your clipboard.
- If `interactive_file_selection` is on, youll pick directories to include in a buffer named `ChatGPT_File_Selection`.
- Save & close with `:wq`, `:x`, or `:bd` (you dont have to use `:q`).
- If `enable_chunking` is on and the prompt exceeds `token_limit`, its split into multiple buffers for you to copy/paste.
2. **Paste Prompt to ChatGPT**
- If multiple chunks exist, copy/paste them one by one in ChatGPT.
3. **`:ChatGPTPaste`**
- The plugin reads the YAML from your clipboard. If it requests more files, the plugin might chunk that request too if large.
- The plugin reads the YAML from your clipboard. If it requests more files, it might chunk that request, too.
- If final changes are provided:
- Optionally preview them (`preview_changes`).
- Optionally partially accept them (`partial_acceptance`).
@@ -62,5 +62,6 @@ token_limit: 3000
- If partial acceptance is confusing, remember to remove or prepend `#` to lines you dont want before saving and closing the buffer.
- If chunking occurs, ensure you copy/paste **all chunks** into ChatGPT in the correct order.
- Check `ChatGPT_Debug_Log` if `improved_debug` is on, or the Neovim messages if `debug` is on, for detailed info.
- You can close the selection or prompt buffers at any time with commands like `:bd`, `:x`, or `:wq`. No need to rely on `:q`.
Enjoy your improved, more flexible ChatGPT Neovim plugin with chunking support!
Enjoy your improved, more flexible ChatGPT Neovim plugin with chunking support!