Plugging in a custom command to vim/fzf

96 Views Asked by At

I have created a command that lists "interesting" files. The output is a list of file names separated with new lines (much like the output of grep -l). The command is called lif - for 'list interesting files'.

I would like to use this command with the fzf plugin in vim, that is - after typing:

  :Lif

at the vim prompt, I would like to see a list of files and a file preview window, much like

  :Ag searchstring

or

  :Rg searchstring

give me a list of files matching searchstring and their preview. (The only difference being, I do not have to specify the searchstring.)

How can I plug lif into vim/fzf?

0

There are 0 best solutions below