DanilaMihailov / beacon.nvim

Whenever cursor jumps some distance or moves between windows, it will flash so you can see where it is
339 stars 9 forks source link

Prevents autocmd from closing coc-explorer #19

Open unknowledgeable opened 4 years ago

unknowledgeable commented 4 years ago

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!

BerkeleyTrue commented 4 years ago

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',
      \]