Home Download Buy Blog Forum Support

Syntax Specific Settings in Plugins

Syntax Specific Settings in Plugins

Postby clintberry on Thu Apr 12, 2012 10:18 pm

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
clintberry
 
Posts: 2
Joined: Thu Apr 12, 2012 10:01 pm

Re: Syntax Specific Settings in Plugins

Postby jbjornson on Fri Apr 13, 2012 12:50 pm

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?
jbjornson
 
Posts: 348
Joined: Tue Oct 27, 2009 4:25 pm
Location: Zurich, Switzerland

Re: Syntax Specific Settings in Plugins

Postby bizoo on Fri Apr 13, 2012 1:00 pm

clintberry wrote: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

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.
bizoo
 
Posts: 879
Joined: Wed Dec 08, 2010 6:53 am
Location: Switzerland

Re: Syntax Specific Settings in Plugins

Postby clintberry on Mon Apr 16, 2012 5:13 pm

Amazing! That did it!
clintberry
 
Posts: 2
Joined: Thu Apr 12, 2012 10:01 pm


Return to Plugin Development

Who is online

Users browsing this forum: daejin and 7 guests