Preferee: Tips and Tricks

Preferee is a user defaults editor targeted at advanced users, and its operation is hopefully mostly obvious from looking at its windows and menus. So instead of a full-blown help file that you'll never need or want to read, we've put together this collection of tips that may not be quite so obvious.

 

Getting Started

The main window may seem a little empty at first. Think of it as a blank slate: You can either add individual domains (and files, see below) you'd like to work with, or you can have Preferee show all known domains via ViewShow All Domains and then, if necessary, make some of those domains favorites, which will be pinned to the top of the list.

§

The FileSwap command lets you switch out an app's settings for something you import, or a set of manual edits. Once you've swapped, Preferee will hold on to your original settings for that app until you swap back (via the FileSwap Back menu item, or the button in the top right corner of the window). You can safely quit Preferee and resume work later, and your original settings will still be there for your back-swapping needs.

§

As mentioned above, Preferee is a user defaults editor first and foremost, but it moonlights as a general-purpose property list and JSON file editor. If you open any file that can be interpreted as one of those (but doesn't represent a user defaults domain) in Preferee, it will appear in the sidebar, and you can add it to your favorites just like you can with user defaults domains.

A simple example for editing non-domain property lists would be changing a *.webloc file's URL.

Minor caveats:

§

Preferee automatically reflects any changes to user default domains and files, unless it has its own unsaved changes for them.

 

Editing

What does FormatUse Shorthand Syntax do, exactly? That depends on whether you're viewing XML or JSON, which is also set via the Format menu.

§

Generally speaking, Preferee's format options (XML vs. JSON, optional shorthand) only affect what you work with while editing. Once you save, Preferee will use the format you started out with. For user default domains, that's XML property lists.

§

Preferee offers code/text folding for dictionaries, arrays, and data elements. In fact, data elements are folded by default, since you most likely don't want to edit them by hand anyway. In addition to folding and unfolding elements individually, you can fold or unfold all relevant elements at once via the View menu.

§

Preferee checks your syntax. If it finds any errors, it will highlight them, and a "Syntax Error" (or "Type Mismatch") button will appear in the top right corner of the window. Click it to get an alert with a detailed error message.

 

Saving

Preferee updates the user defaults as soon as you save, but it cannot guarantee that edits will have an effect in targeted apps right away, because those apps may cache their settings in some fashion. To work around this, Preferee can optionally relaunch the app associated with the settings you're saving, if said app is running:

The optional relaunch feature

If, on the other hand, the app is not running, there's no problem, so Preferee won't ask you. Also, if you select "Don't ask again," you can still change your mind later, via the Preferee menu.

§

As in Xcode, you can save all your edits in one action by using the ⌥⌘S shortcut, or by holding down the Option key and selecting the FileSave All menu item. With the Option key down, the File menu also has a matching Revert All to Saved entry to undo everything you did.

 

Geeky Little Things

Out of the proverbial box, Preferee has separate sidebar sections for Apple's user default domains and ours. If you use Preferee to look at its own user defaults, and if you also have a basic understanding of how regular expressions work, you'll quickly figure out how to add your own (or maybe just remove ours).

§

Preferee distinguishes between container user default domains owned by sandboxed apps on the one hand, and standard user default domains owned by non-sandboxed apps on the other hand. If you happen to have apps where the same bundle identifier is used by a sandboxed and a non-sandboxed version of the app, you will be able to edit those separately. (The shortcomings of defaults write in this regard were actually one of the reasons why we created Preferee.)

§

While convenient to work with, JSON actually can't fully represent property lists, because it lacks support for data and date elements. Preferee works around this by assigning special meaning to data:… and date:… strings. This works just fine in the real world, but it explains why Preferee will refuse to display property lists as JSON in rare scenarios where the property list in question already contains strings with "data:" or "date:" prefixes.

§

The x-preferee:[domain or query] URI scheme is pretty neat! For example, try open x-preferee:com.manytricks.Moom or even just open x-preferee:moom.

 

More Help

If the above isn't enough, and you need additional assistance with Preferee, you can reach out to us via our other channels. Use our support page to open a trouble ticket or email us directly, and you can often find us on our Discord server.