Sublime Forum

Syntax Specific Settings in Plugins

#1

I was wondering if it is possible for a plugin to have syntax specific settings. If so, can anyone point me to a plugin that is doing that so I can get an idea for how it is done

Thanks,

Clint

0 Likes

#2

What exactly do you mean by syntax specific settings? That the plugin has different functionality depending on what the active syntax is? That the plugin can change the current syntax? Something else?

0 Likes

#3

[quote=“clintberry”]I was wondering if it is possible for a plugin to have syntax specific settings. If so, can anyone point me to a plugin that is doing that so I can get an idea for how it is done

Thanks,

Clint[/quote]

https://github.com/wbond/sublime_alignment
Simply put your settings in a sublime-settings file with the name of the syntax, like Javascript.sublime-settings.

Look at http://docs.sublimetext.info/en/latest/customization/settings.html#order-of-precedence-of-sublime-settings-files.

0 Likes

#4

Amazing! That did it!

0 Likes