vimade icon indicating copy to clipboard operation
vimade copied to clipboard

Allow to start vimade disabled

Open hupfdule opened this issue 6 years ago • 6 comments

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.

hupfdule avatar Jul 08 '19 08:07 hupfdule

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.

TaDaa avatar Jul 08 '19 15:07 TaDaa

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

hupfdule avatar Jul 09 '19 06:07 hupfdule

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?

TaDaa avatar Jul 09 '19 15:07 TaDaa

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.

hupfdule avatar Jul 10 '19 07:07 hupfdule

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.

TaDaa avatar Jul 12 '19 15:07 TaDaa

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.

hupfdule avatar Jul 15 '19 06:07 hupfdule

Closing out older issues that were either fixed or could have been external conflicts. Thanks for filing the report and re-open if needed!

TaDaa avatar Aug 12 '24 03:08 TaDaa