Sublime Forum

Different setting files for different platforms?

#1

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.

0 Likes

#2

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).

0 Likes

#3

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

0 Likes

#4

[quote=“rchl”]I suppose you could modify ~/.bash_profile to add the path where your git is. Something like:

export PATH="$PATH:/opt/local/bin"
[/quote]

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

0 Likes

#5

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.

0 Likes

#6

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

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.

0 Likes