TaDaa / vimade

An eye friendly plugin that fades your inactive buffers and preserves your syntax highlighting!
MIT License
486 stars 8 forks source link

Allow to start vimade disabled #25

Open hupfdule opened 5 years ago

hupfdule commented 5 years ago

It seems that there is no option to start vimade disabled and having to activate it via VimadeEnable. I think such an option could help to work around problems like #24.

TaDaa commented 5 years ago

Added some documentation and cleaned up some logic to support Vimade disabled at startup -- You can use either

I think for the issue that you were experiencing, this shouldn't be necessary anymore, the garbage characters were likely being caused by detecttermcolors, which I've now set to disabled by default.

hupfdule commented 5 years ago

Hmm, I tried with let g:vimade_running=0, but still vimade is enabled on startup.

TaDaa commented 5 years ago

Strange -- will need more info, what is the indication that vimade is still enabled -- are the buffers still fading or something else?

Also can you verify that g:vimade_running is still 0 after vim has loaded?

hupfdule commented 5 years ago

Well I could have done that in the first place… Didn't think about it, sorry. Yes, I can see that vimade is enabled, since it does fade the content of my windows. And the result of echo g:vimade_running is: 1.

Now I have tried around a bit and found the following.

I am using the Volt package manager for vim 8 where I can define configuration settings to be done per package before a package is loaded or after a package is loaded.

I have played around with setting g:vimade_running before and after loading the package and calling nvim -o file1 file2 and I still see a difference:

  1. Not setting g:vimade_running at all not_set

  2. Setting g:vimade_running before loading the package before

  3. Setting g:vimade_running after loading the package after

In all three cases the value of g:vimade_running is 1. But you can also see that when setting it to 0 before loading the package the dimming of the lower, non-active window doesn't get activated. However, as soon as I switch the focus to the lower window, the upper window gets dimmed. That corresponds to the setting of g:vimade_running=1, of course.

So it seems that the setting of g:vimade_running = 0 is working correctly, but gets overwritten at some time when loading the plugin.

TaDaa commented 5 years ago

Will take a look as soon as I get a chance -- do you have a minimal vimrc that I can use? If not I'll try to recreate with volt.

hupfdule commented 5 years ago

I tried to provide a minimal vimrc to reproduce it, but it doesn't happen there.

So I tried using volt, but also with no other plugins and an empty .vimrc and it still doesn't happen.

So there seems to be a conflicting plugin or setting in my vimrc.