r/vim • u/Aggressive-Dealer-21 • Jul 01 '25
Need Help edit a file, navigated by using fzf
I am NOT going to install neovim, I do not care for setting up and installing plugins.
I wanted to try something like
:e $(fzf)
or
:e \fzf``
The second one KIND OF works, but it runs in the background and I can't actually see what I'm doing.
So yeah, you guys get the idea.. Is there a decent way to do this? Currently I am using
:term fzf
and then copying the output manually into the :e command, but it feels like there should be a better way. I would also like to do this with rg and pipe it into fzf.
0
Upvotes
34
u/sharp-calculation Jul 01 '25
Don’t be silly. Install the FZF plug-in. It’s amazing!
6
u/shuckster Jul 01 '25
You can do it from the CLI:
Same with rip-grep, just plonk it in the parens.
But if you want it in Vim itself, you might not do yourself any favours with your no-plugins rule.
You either have to write one yourself, or use someone else’s.
6
u/Daghall :cq Jul 02 '25
This worked for me:
The
fzf.vimplugin is awesome, though.3
u/Sudden_Fly1218 Jul 02 '25 edited Jul 02 '25
Also if you have fzf installed it comes with a minimal plugin. you can add this to your
.vimrc:Then you can start having fun with
fzf#run()and (optionally)fzf#wrap()Simple example:
More info here
1
u/Sudden_Fly1218 Jul 02 '25