Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to start vimade disabled #25

Open
hupfdule opened this issue Jul 8, 2019 · 6 comments
Open

Allow to start vimade disabled #25

hupfdule opened this issue Jul 8, 2019 · 6 comments

Comments

@hupfdule
Copy link

hupfdule commented Jul 8, 2019

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
Copy link
Owner

TaDaa commented Jul 8, 2019

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.

@hupfdule
Copy link
Author

hupfdule commented Jul 9, 2019

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

@TaDaa
Copy link
Owner

TaDaa commented Jul 9, 2019

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
Copy link
Author

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
Copy link
Owner

TaDaa commented Jul 12, 2019

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
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants