-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] Auto associate a set of file with a specific tab when openning #13
Comments
Can't you do it with something like this? vim.api.nvim_create_autocmd("BufAdd", {
callback = function(args)
if args.file:match ".*.test.ts" then
vim.cmd.Bdelete() -- famiu/bufdelete.nvim
vim.cmd.tabfirst()
vim.cmd.buffer(args.buf)
end
end,
})
|
Thanks for the answer.
I will try to figure out what is wrong this weekend. Anyway, IMHO it's easier and cleaner if we can include the policy inside the plugin config, rather have to create a separate auto-command. |
I thought there would be an easy fix like a PreAdd event. I will think about it. Feel free to open a PR if you have something in mind, like the policy strategy. |
After testing, I found some points:
|
I'm looking for a way to define a condition to associate a set of file with a tab
For example, I would like when openning, each "*.test.ts" come into a specific tab.
It's best if I can provide a callback to define association policy during setup, something like the pseudo code
The text was updated successfully, but these errors were encountered: