New answers tagged

0

I would use a timer to avoid messing with the buffer during the BufHidden event; something like function tools#DeleteBuffer(bufnr) if !&modified && tools#TimeSinceModified(bufname(a:bufnr)) > s:delete_buf_after_s call timer_start(100, {_ -> execute('bdelete '.a:bufnr)}) endif endfunction We have to use the execute() function here ...


2

You'll find more details under :h active-buffer and the sections that follow... *active-buffer* active: The buffer is displayed in a window. If there is a file for this buffer, it has been read into the buffer. *hidden-buffer* hidden: The buffer is not displayed. If there is a file for this ...


Top 50 recent answers are included