I guess that this might not be related to ollama.nvim plugin, though. I am just a vim user and do not know how to do that. So, my question is how I get the word under the cursor when making ollama.nvim commands. I know how I could use the following variables:
$input
$line
$sel
I would like to make a prompt with a word in a text. Now, I first visually select a word in vim using vi command viw then use $sel variable to make a prompt. I tend to repeat the viw command a lot, and am wondering if I could avoid that repetition.
So, if there is a like $word variable, that would be great. I guess there is no such thing. If not, any lua/vim programming tip to do that would be appreciated.
I guess that this might not be related to ollama.nvim plugin, though. I am just a vim user and do not know how to do that. So, my question is how I get the word under the cursor when making ollama.nvim commands. I know how I could use the following variables:
$input
$line
$sel
I would like to make a prompt with a word in a text. Now, I first visually select a word in vim using vi command
viw
then use$sel
variable to make a prompt. I tend to repeat theviw
command a lot, and am wondering if I could avoid that repetition.So, if there is a like
$word
variable, that would be great. I guess there is no such thing. If not, any lua/vim programming tip to do that would be appreciated.Thank you,