Open hupfdule opened 5 years ago
Added some documentation and cleaned up some logic to support Vimade disabled at startup -- You can use either
let g:vimade_running=0
call vimade#Disable()
VimadeDisable
- the command may or may not work during startup depending on the plugin manager.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.
Hmm, I tried with let g:vimade_running=0
, but still vimade is enabled on startup.
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?
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:
Not setting g:vimade_running
at all
Setting g:vimade_running
before loading the package
Setting g:vimade_running
after loading the package
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.
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.
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.
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.