guns / xterm-color-table.vim

All 256 xterm colors with their RGB equivalents, right in Vim!
http://github.com/guns/xterm-color-table.vim
384 stars 37 forks source link

Doesn't work with nvim and vim-plug #14

Closed FalcoGer closed 1 year ago

FalcoGer commented 1 year ago

When sourcing the file directly the script works fine, but when using vim-plug and loading this as a plugin with

Plug 'guns/xterm-color-table.vim'

the script behaves erratically. Sometimes it pastes the color table at the top of the current buffer when invoked with :XtermColorTable, especially if the XtermColorTable buffer has been deleted and sets the buffer to not modifiable. Of course this completely destroy the work. It looks something like this.

image

It also opens a new tab for no reason. The split versions open a new split, but only if the XtermColorTable buffer already exists, but sometimes it remains empty. It's a complete mess.

FalcoGer commented 1 year ago

It might be a problem with nvim, or an incompatibility with bufferline. Not sure.

FalcoGer commented 1 year ago

Turns out sourcing the file directly produces the same bug. I have disabled all plugins and the bug still occurs. It seems like this is a problem with nvim. Ind it's reproducible like this

  1. nvim /some/file/that/exists
  2. :XtermColorTable

Result:

Expected result

FalcoGer commented 1 year ago

Turns out this was the culprit

augroup AutoNewTab
    autocmd!
    " autocmd BufAdd,BufNewFile * nested tab sball
    autocmd BufNewFile * nested tab sball
augroup END

But I don't need it anymore since i use bufferline now.