Hi, I have this autocmd:
vim.api.nvim_create_autocmd({"BufWipeout"}, {
pattern = "*",
callback = function()
vim.cmd([[call cursor(1, 1)]])
vim.cmd([[mkview | filetype detect]])
end
})
It didn’t work, I tested with BufDelete, BufWipeout, BufUnload, BufWinLeave and maybe another one I does not remember.
- BufDelete; BufWipeout: Nothing happens.
- BufUnload; BufWinLeave: Unwanted behavior occurs (since I need the commands to execute only and right before the buffer ceases to be.
Anyone have a suggestion to fix this?
Thanks.