Sublime Forum

Enabling a plugin when distraction mode is on

#1

Hi,

I am trying to limit a plugin, which uses the EventListener, to only function when distraction mode is on.

Any ideas?

0 Likes

#2

Create, or edit the existing, Packages/User/Distraction Free.sublime-settings and add in the following:

[pre=#0C1021]{
“is_distraction_free” : true
}[/pre]
From there it’s just a matter of checking view.settings().get('is_distraction_free')

That’s one way but there might be others.

0 Likes

#3

Nifty. Thank you very much!

0 Likes