Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

variable for the word under the cursor #18

Open
goshng opened this issue Jan 12, 2024 · 0 comments
Open

variable for the word under the cursor #18

goshng opened this issue Jan 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@goshng
Copy link

goshng commented Jan 12, 2024

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.

Thank you,

@nomnivore nomnivore added the enhancement New feature or request label Feb 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants