Skip to content
Discussion options

You must be logged in to vote

There are many different ways to achieve this maybe with custom rg_opts, if the files are open you can also use lines picker - I don’t think another custom picker is required.

chatgpt create this function for me that looks like is working, you put the words separated by space.

local function grep_files_by_words()
  vim.ui.input({ prompt = "search files with words separated by space:  " }, function(input)
    if not input or input == "" then return end

    local words = vim.split(input, "%s+")
    if #words == 0 then return end

    local cwd = vim.fn.expand("~/PATH TO THE NOTES")
    local all_files = vim.fn.globpath(cwd, "**/*.md", false, true)

    local filtered = {}

    for _, fil…

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@ibhagwan
Comment options

@barcell1
Comment options

@ibhagwan
Comment options

@barcell1
Comment options

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