nomnivore / ollama.nvim

A plugin for managing and integrating your ollama workflows in neovim.
MIT License
311 stars 22 forks source link

variable for the word under the cursor #18

Open goshng opened 5 months ago

goshng commented 5 months ago

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:

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.

Thank you,