Closed gzfrozen closed 3 months ago
Hi @gzfrozen ,
Thanks for reporting, do you have an example?
How do you select the text, with v or V?
@David-Kunz I tried both v select and V select, single line and multiple lines. But all seem to only grab the character under the final cursor's place.
Thank you @gzfrozen , it works for me. Are you using the newest version?
@David-Kunz Yes. I started to use this plugin yesterday so I think it"s the newest version.
@David-Kunz https://github.com/gzfrozen/gen.nvim/commit/8e1999ef97a4a41f9d95888fc9b8677cc296094c
I tried to debug this by print out the grabbed content, and it seems to grab only 1 character:
Thank you, @gzfrozen , could you update the plugin? Yesterday there have been many changes. Thank you!
@David-Kunz I updated to the latest version (46ab810). And it is still unfixed.
Thank you, @gzfrozen .
Could you try it with the following keymap?
vim.keymap.set({ 'n', 'v' }, '<leader>]', ':Gen<CR>')
then select some text (e.g. with shift-v) and trigger the command.
So far, I could not reproduce your issue.
Thank you, @gzfrozen .
Could you try it with the following keymap?
vim.keymap.set({ 'n', 'v' }, '<leader>]', ':Gen<CR>')
then select some text (e.g. with shift-v) and trigger the command.
So far, I could not reproduce your issue.
@David-Kunz Wow, that fix my problem. Thank you!
My key binding target command was <cmd>Gen<GR>
, and it failed.
After I change it to :Gen<GR>
and the problem is fixed.
I'm new to vim and don't know the difference between <cmd>
and :
, so there is a difference I guess.
Thanks for confirming, @gzfrozen !
While Select any amount of text (both in v and V mode), use prompt contains
$text
to generate, there seems to be only one character is grabbed into the prompt.In the following example, it seems only
,
is send to the prompt.The prompt I am using: