llama.vim : add inst support for classic vim#106
Conversation
|
Nice :) |
I'll take a look, I don't think I actually tried that. |
This commit add instruction support for classic vim. This differs a little from the neovim version but it works well enough this far. After selecting a code block and entring an instruction command the will be a information ghost test specifying the number of tokens being generated, and after the generation is completed there will be a note saying: ``` 16 ✅ Ready! Press <Tab> to accept. ``` Note sure if this is the optimal way but I've started using this and will iterate and improve as I go.
918f9cc to
5394a09
Compare
|
@ggerganov I think the undo should work now. |
|
I've tried this a bit and it works well so far, although I think my preferred FIM model (Qwen3 30B-A3B) doesn't like the inst prompt format very much. GLM 4.7-air does though! I will keep trying it out. This is a very nice feature, and I'm stuck in my classic vim ways at this point. Edit: I'm curious if #109 will help Qwen once the branches are merged. |
|
Although I also still continue to use Qwen3 Coder 30B-A3B for FIM, I never actually tried to use the new instruct feature with it - directly went with gpt-oss-120b. My feeling is that both gpt-oss-120b and GLM-4.7-Flash would be significantly better for these instruct tasks compared to Qwen3 Coder 30B-A3B because they have reasoning. |
|
I'm also using Qwen3 Coder 30B-A3B for FIM, and gpt-oss-20b-GGUF for the instruction model which seems to work well. |
This commit removes the duplicate prop_remove calls that are currently in the llama#inst_accept function. These calls are also done in the s:inst_remove function. The order of operations is also changed so that the inst_remove is called before inst_callback. The reason for this is that in inst_callback deletebufline is called the text properties are attached to the lines that are being deleted. Later when vim restores (undo) the classic vim will restore the deleted lines including the text properties. So the text properties will come back unless they are removed before this. By calling inst_remove first we are explicitly removing the text properties first.

This commit add instruction support for classic vim. This differs a little from the neovim version but it works well enough this far.
After selecting a code block and entring an instruction command the will be a information ghost test specifying the number of tokens being generated, and after the generation is completed there will be a note saying:
Note sure if this is the optimal way but I've started using this and will iterate and improve as I go.