@dave thanks for sharing! I also have similar mappings to close buffers, but I'm using <leader>q
instead. I had a similar function to your Bclose
function, but it was failing in some corner cases and now I use the Sayanora plugin. I globally mapped <leader>q
to :Sayonara
and for some buffers types I remap it to something else. I'm adapting your map a little bit, I added this autocmd BufEnter conjure-log-* nnoremap <buffer><silent> <leader>q :lua require('conjure.log')['close-visible']()<CR>