preservim / vim-indent-guides

A Vim plugin for visually displaying indent levels in code
MIT License
2.62k stars 162 forks source link

Indent guides don't appear when second tab is opened #139

Open kskollepara opened 4 years ago

kskollepara commented 4 years ago

Indents appear perfectly fine when I open a single file. However, if I open a second file using tabe, then I lose indent guides in both files. Is this a bug or am I doing something wrong? My vimrc has a single line related to indent guides:

let g:indent_guides_enable_on_vim_startup = 1

and my python.vim has following lines:

let g:indent_guides_auto_colors = 0
autocmd VimEnter,Colorscheme * :hi IndentGuidesOdd  guibg=red   ctermbg=3
autocmd VimEnter,Colorscheme * :hi IndentGuidesEven guibg=green ctermbg=4

Single Tab view: 1

Multiple tab view: 2

nathanaelkane commented 4 years ago

Very strange. I'm unable to reproduce the problem on my end.

kskollepara commented 4 years ago

Maybe you could reproduce it with my python.vim and vimrc. If you need to look at my .vim folder, I have included the tree output of the folder python.vim.txt vim_folder_structure.txt vimrc.txt

kskollepara commented 4 years ago

The pics I posted were for the python scripts. I checked if the problem persists for other formats by including the same settings in my latex files. Surprisingly, in case of tex files, opening a second tab changed the colour to gray, but still displayed the indents. Don't know if this is useful. See the screenshots below With only one tab : image After opening a second tab: image

EDIT: I think it has something to do with the colorscheme.