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

[Question]: Is it possible to disable by default? #136

Closed
JakeElder opened this issue Jul 3, 2020 · 2 comments
Closed

[Question]: Is it possible to disable by default? #136

JakeElder opened this issue Jul 3, 2020 · 2 comments

Comments

@JakeElder
Copy link

Is it possible to have vim-css-color disabled by default?

If possible I would rather have it disabled, then toggle it to be enabled/disabled with a key binding IE

nmap <leader>tcc :call css_color#toggle()
@at1047
Copy link

at1047 commented Aug 8, 2020

I couldn't make it work by using startup scripts but if you go into the file in autoload in the plugin there's a function at the bottom called "css_color#init". Inside I commented the line "call css_color#enable()". It still works with a call to css_color#toggle() but disables it on startup.

@ap
Copy link
Owner

ap commented Aug 9, 2020

Thank you so much for that, @at1047 – I really don’t know why this didn’t occur to myself years ago, it’s so obvious in retrospect. If I hadn’t already made up my mind to restructure the plugin entirely, as mentioned in #125, I’d be implementing your approach right now. And I may still do so anyway when I get around to the restructuring.

I’m closing this particular ticket, since it duplicates #125. (@JakeElder: you may want to subscribe that one.)

@ap ap closed this as completed Aug 9, 2020
@ap ap added the enhancement label Aug 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants