Skip to content

How do I search files include two words? #1943

Answered by nenahp
scc02 asked this question in Q&A
Discussion options

You must be logged in to vote
  1. you didn't provide actions for your keys (enter, ctrl-s...)
fzf_exec(cmd, { actions = { enter = function() ... end })

Use :helpgrep actions.file_edit, you will find more builtin actions.

  1. your line format didn't provide a standard format that fzf-lua actions can parse. (so the builtin actions won't work).
    (And since you didn't provide a filename each line: it's also impossible to get where the file is, since fzf-lua didn't store entry internally, they are streaming in another fzf process... if you want to hide filename? you can use fzf_opts.["--with-nth"], checkout man fzf for details about that).

  2. I personally think there's some (maybe) alternatives to your workflow...

  • use fzf-lua…

Replies: 2 comments 6 replies

Comment options

You must be logged in to vote
1 reply
@scc02
Comment options

Answer selected by scc02
Comment options

You must be logged in to vote
5 replies
@scc02
Comment options

@nenahp
Comment options

@ibhagwan
Comment options

@scc02
Comment options

@ibhagwan
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants