FZF - search for the tag under cursor


I’m trying to add a functionality which would allow me to just press one hotkey:

  • the selection would expand around the word
  • that word would be piped into FZF
  • FZF would ask me about what type of a tag is that word
  • a typical list of that type of tags would show up (via FZF)

This is the attempt:

map global normal <c-y> '<a-a>w<ret>:fzf -fzf-impl "fzf -i -q ${kak_selection}"'

Obviously it’s far from what I’m trying to get:

  • I don’t know how to properly start the fzf-mode with the -q argument
  • I don’t know how to insert the current selection into this command

Help would be appreciated, thanks.

so you want a default input in fzf to be your selection. I’ll see if can add this to fzf.kak

@MrOneTwo please check latest update for fzf.kak

@andreyorst Cool, thank you. Works well and seems to be pretty useful.

Can this feature be disabled by option?

I’ll add fzf_use_main_selection later today. Do you think this should be set to true by default or not?

@TeddyDD, I find this feature quite useful, so I’ve decided that it will default to true. You now can disable it with the option I’ve listed above, so please update

1 Like

Thanks a lot!