Sublime Forum

Per OS Preferences in User

#1

It would be great to be able to use “windows”: { } and “osx”: {} in user preferences file.
I tried using Preferences (Windows).sublime-settings in User but this still does not work.

Ideally having one file would be best, so you can edit all the config in one place but the ability to use Preferences (OS).sublime-settings file in User would be good as well.

I find for some reason Source Code Pro font looks great in Medium on Windows, but far too fat on OSX so I want to use Light. But if I use Light on Windows it is really thin and looks weird.

Looks like (OS) works for keymap but preferences still are not supported.

0 Likes

#2

Sorry to necro an old thread, but this is something I keep on looking for and the various online responses to everyone asking this question always fall into the following categories:

  1. Why would you want that? (even though it’s specified in the question)
  2. Just write a plugin, it should be easy! (if so, then why isn’t there one already)
  3. Just don’t synchronize your font settings (with no indication of how one could do that while still synchronizing everything else)

I use DropBox to synchronize my settings and sometimes I’ll be using Sublime Text on a Windows machine and a Mac side-by-side and as I change the font size on one machine, it immediately changes on the other. This is really annoying.

If there were a way to just specify font-face settings on a per-platform basis, or have Preferences.sublime-settings have a thing like:

{
    "some-setting": "foo",
    "some-other-setting": "bar",
    "platform-overrides": {
        "OSX": {
            "some-setting": "baz"
        }
    }
}

things would be sooooo much better.

0 Likes

#3

I’ve been using the following to control per-OS font face and size:

Packages
├── Default
│   ├── Preferences (Linux).sublime-settings
│   └── Preferences (Windows).sublime-settings
└── User
    └── Preferences.sublime-settings

I make sure that the User file does not contain the keys that are in the OS-specific files and that works well. If you resize your font with Ctrl+Wheel or some other key binding it sets the font size in the User file again, so keep an eye out if things don’t update.

However, for some plugins it would be nice to have this option too. I haven’t tried the above on a normal package yet, haven’t actually thought to until now. Specific example is EasyClangComplete - potentially very different settings on Windows and Linux.

0 Likes