Any way to open the most closely matching file directly? #1156
niamleeson
started this conversation in
General
Replies: 2 comments 1 reply
-
Fzf has an option to open the selected match if only one match is available, from -1, --select-1
If there is only one match for the initial query (--query), do
not start interactive finder and automatically select the only
match If you pre-supply the input text (query) and there will be only one match, fzf-lua will open the first selected match, for example:
:FzfLua files fzf_opts.--select-1=true query=compjs
:lua require("fzf-lua").files({fzf_opts={["--select-1"]=true},query="copmjs"}) The only limitation is that there must be one match only, if your |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello thank you for making this awesome plugin!
I'm trying to improve my workflow a little bit better. In my workflow, I work with 4 files:
If I'm on the component js file, I'd like to quickly navigate to other related files. But the files could be under different nested directories. So I'd like to use the current file name and some additional keywords to search for the related files and open the most closely matching one.
Right now, the commands open the file explorer. Is there a way to immediately open the most closely matching file?
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions