Home Download Buy Blog Forum Support

Different setting files for different platforms?

Different setting files for different platforms?

Postby luislavena on Tue Feb 14, 2012 11:30 pm

Hello,

On a daily basis I switch between OSX/Windows and Linux and is hard to keep my settings in sync between them. Every time added a new plugin or changed a preference for one language I need to remember do the same on the other OS installations.

Because of that, decided to move settings to DropBox and use it for syncing, which is great.

However, there is a small catch: specific settings for the plugins are not aware of platform.

Let me give you an example:

For Terminal plugin, I've created a a Terminal (Windows).sublime-settings and Terminal (OSX).sublime-settings files, both inside Packages/User

Problem is, none of these are read, so it defaults to what the plugin defines as defaults.

Some happens for Git. On OSX I use MacPorts git installation (/opt/local/bin/git) but on Windows and Linux I get use the git from the PATH.

Any suggestion on how to deal with this?

Thank you.
luislavena
 
Posts: 25
Joined: Fri Jun 04, 2010 7:15 pm

Re: Different setting files for different platforms?

Postby rchl on Wed Feb 15, 2012 12:05 am

For git I'd just make sure that "git" command is reachable without specifying full path.

I have git in /opt/local/bin too. Not sure whether I had to do something special but I have it in my PATH so it just works. On both Windows and Mac.

I suppose you could modify ~/.bash_profile to add the path where your git is. Something like:

export PATH="$PATH:/opt/local/bin"

or just symlink to the directory that is already in the path (but probably has to be accessible to non-root users to work).
rchl
 
Posts: 148
Joined: Fri Mar 04, 2011 11:02 pm

Re: Different setting files for different platforms?

Postby jps on Wed Feb 15, 2012 2:55 am

Platform specific settings are ignored in the User package, but you can place them in other packages.
jps
Site Admin
 
Posts: 3077
Joined: Wed Mar 19, 2008 12:33 pm

Re: Different setting files for different platforms?

Postby luislavena on Wed Feb 15, 2012 11:40 am

rchl wrote:I suppose you could modify ~/.bash_profile to add the path where your git is. Something like:

export PATH="$PATH:/opt/local/bin"


Problem is when you fire up ST2 from the dock or using Quicksilver, the PATH that you specify in bash_profile does not work.
luislavena
 
Posts: 25
Joined: Fri Jun 04, 2010 7:15 pm

Re: Different setting files for different platforms?

Postby luislavena on Wed Feb 15, 2012 11:42 am

jps wrote:Platform specific settings are ignored in the User package, but you can place them in other packages.


Jon, since User package is the expected place for customization, wouldn't be good to have this platform-specific functionality? So you can:

Git.sublime-settings
Git (Windows).sublime-settings

And you put your general customization on first and platform-specific ones in the later?

Thank you.
luislavena
 
Posts: 25
Joined: Fri Jun 04, 2010 7:15 pm

Re: Different setting files for different platforms?

Postby rchl on Wed Feb 15, 2012 12:27 pm

luislavena wrote:
rchl wrote:I suppose you could modify ~/.bash_profile to add the path where your git is. Something like:

export PATH="$PATH:/opt/local/bin"


Problem is when you fire up ST2 from the dock or using Quicksilver, the PATH that you specify in bash_profile does not work.

Then setting the path in ~/.MacOSX/environment.plist should do instead. There is a lot of conflicting information out there but apparently this is what I've done on Lion and it works fine.
rchl
 
Posts: 148
Joined: Fri Mar 04, 2011 11:02 pm


Return to General Discussion

Who is online

Users browsing this forum: Google [Bot] and 16 guests