Home Download Buy Blog Forum Support

Per machine settings

Per machine settings

Postby jburnett on Wed Sep 07, 2011 3:12 am

I debated wishing for this, since it's probably a long shot to get implemented, but... it would be nice if we had a way of specifying per-machine settings. In my case, my laptop's DPI is WAY higher than my desktop at work, so my font size needs to be larger. I just wrote a plugin to do this (see https://github.com/johnburnett/SublimeP ... ettings.py ), but it feels very... icky :).

Supporting something like "Base File.hostname.sublime-settings" would be neat...

Sidenote - is there a way to have a plugin that runs stuff once on startup, but after Sublime is "fully initialized"? The above plugin tries to do this by implementing on_activated, and then manually removing itself from sublime_plugin.all_callbacks['on_activated'], but again, that feels "icky".

John
jburnett
 
Posts: 89
Joined: Wed Jul 27, 2011 9:23 pm

Re: Per machine settings

Postby jburnett on Wed Sep 07, 2011 7:53 am

Hm - having a race condition like that sounds even sketchier that manipulating a callback array. Think I'll stick with that for now :)
jburnett
 
Posts: 89
Joined: Wed Jul 27, 2011 9:23 pm

Re: Per machine settings

Postby jburnett on Wed Sep 07, 2011 8:48 pm

After mulling a bit more, I'll re-state my original wish succinctly:

jps - It would be nice to add support for *.hostname.sublime-settings, where those settings only apply on the machine that has a matching hostname. These settings files would work in the pre-existing hierarchy that Sublime already supports (e.g. Default.sublime-settings, FileType.sublime-settings, User/Default.sublime-settings, etc), and applied last in the chain.

sublimator - I'm not modifying any arrays from within loops, so I'm not sure what you're referring to. I'm not worried about hotloading support - the plugin does what I need now that I've pulled the settings out to a config file. Feel free to fork :)

Also, for those following along at home, I've split the plugins out - the repo previously listed is now at https://github.com/johnburnett/sublime-footools , and the per_host_settings.py plugin reads from a file named Packages/User/per_host_yourhostname.sublime-settings
jburnett
 
Posts: 89
Joined: Wed Jul 27, 2011 9:23 pm


Return to Ideas and Feature Requests

Who is online

Users browsing this forum: No registered users and 9 guests