beacon.nvim icon indicating copy to clipboard operation
beacon.nvim copied to clipboard

Prevents autocmd from closing coc-explorer

Open unknowledgeable opened this issue 3 years ago • 1 comments

I use the following to auto-close coc-explorer if it's the last open window:

autocmd BufEnter * if (winnr("$") == 1 && &filetype == 'coc-explorer') | q | endif

which is a suggestion I found based on NERDTree's suggestion for auto-closing their file browser:

autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif

Beacon prevents this from happening with default settings. Any way around this?

E: I'm not sure if setting beacon to ignore buffers would work but I don't really understand how to implement g:beacon_ignore_buffers = [\w*git*\w]. An example with multiple ignores would be very helpful! Thanks!

unknowledgeable avatar Aug 12 '20 13:08 unknowledgeable

Same issue with Fugitive diffs. Prevents the gdiff buffer from closing, which then causes prevents the window from closing normally.

image

edit:

Got it to ignore fugitive buffs.

Here is an example multiline ignore

let g:beacon_ignore_buffers = [
      \ '\w*git*\w',
      \  '\w*fugitive*\w',
      \  '\w*defx*\w',
      \]

BerkeleyTrue avatar Sep 02 '20 21:09 BerkeleyTrue