Yggdroot / indentLine

A vim plugin to display the indention levels with thin vertical lines
MIT License
4.13k stars 227 forks source link

Updating colorscheme on switching buffers changes background for indentlines #353

Closed ayushxx7 closed 3 years ago

ayushxx7 commented 3 years ago

I recently added the following in my .vimrc.

autocmd! BufEnter,BufNewFile *.js colo tender
autocmd! BufLeave  * colo snazzy

Now, whenever I enter a JS file, the tender colorscheme is applied, but it messes up indentlines. It's fixed when I reapply colorscheme tender

Default colors image

Switch to JS File image

The output from conceal: image Here, guibg seems to be the culprit

Fixed when setting tender scheme once more image

How do I fix this?

ayushxx7 commented 3 years ago

I have started using a color scheme that caters to all programming languages properly. If there is a need to switch color schemes (rare), I can switch using :colo for all the windows, and switch back to the original one again using the same command. To make it simpler, I have created maps,

"quickly switch colorscheme
map ,m :colorscheme molokai<CR>
map ,c :colorscheme PaperColor<CR>
map ,t :colo tender<CR>

Closed in: https://github.com/ayushxx7/dotfiles/commit/e227eedbcacf0f34ec54775f75c6cb4265bd1efb