Skip to content

How to handle multiple patterns for events #387

Answered by folke
axieax asked this question in Q&A
Discussion options

You must be logged in to vote

That should work as is I think? "*.md,*.txt,*.tex" is a valid value for the pattern field.

The below for example works:

vim.api.nvim_create_autocmd("InsertEnter", {
  pattern = "*.html,*.lua",
  callback = function()
    vim.notify("InsertEnter")
  end,
})

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by axieax
Comment options

You must be logged in to vote
0 replies
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