Snippet's Hidden Preferences

Snippet

To enable some of the features, you'll have to use Terminal (found in /Applications/Utilities/) and the defaults command line.

Change Line Endings

You can have Snippet replace all line endings by generally any string, but was made originally to let you decide what line ending to use (LF/CR/CR+LF).

e.g. to make sure all line endings are LF, open Terminal and enter defaults write com.fuelcollective.snippet LineEnding -string '\n'

To cancel this feature, enter defaults delete com.fuelcollective.snippet LineEnding.

Availability: 1.4 and later


Using AND instead of OR in search

By default, Snippet searches for any of the words that are enetered and puts the most relevant search results at the top. If you want Snippet to search for all of the words entered instead, open Terminal and enter defaults write com.fuelcollective.snippet UseANDInsteadOfOR -bool yes

To cancel this, enter defaults delete com.fuelcollective.snippet UseANDInsteadOfOR.

Availability: 1.4.1 and later


Tokens And Placeholders

In many snippets, you might have some variables that you need to change in the code itself as there would be collisions if you need to use the same code several times subsequently. For this, Snippet has a hidden feature Tokens and Placeholders - choose a placeholder (you can change both tokens and placeholders while the app is running!) and write it to the defaults using Terminal: defaults write com.fuelcollective.snippet Placeholder -string '[*]' (for a [*] placeholder). Then you can change the token the same way: defaults write com.fuelcollective.snippet Token -string 'MyTable'.

To cancel this, enter either defaults delete com.fuelcollective.snippet Token, defaults delete com.fuelcollective.snippet Placeholder, or both (it won't work unless both items are set, so delete just one will cancel this feature).

Availability: 1.4.1 and later


Color Of Tags In Search Results

Some people can find the tag color in search results too dark on some kinds of displays, so there is a way to change the brightness: defaults write com.fuelcollective.snippet TagBrightnessValue -float 1.0 - where 1.0 is brightest (white) and 0.0 is darkest (black). Please, note that you need to relaunch Snippet in order for this to take effect. The default value is 0.2.

To cancel this, enter defaults delete com.fuelcollective.snippet TagBrightnessValue.

Availability: 1.4.1 and later


Disable Automatic Database Saving

Snippet's database gets saved (if it's modified) every 5 minutes. If you want it to be saved only when you're terminating Snippet, use this command: defaults write com.fuelcollective.snippet FCDBAutomaticSavingDisabled -bool YES

To cancel this, enter defaults delete com.fuelcollective.snippet FCDBAutomaticSavingDisabled.

Availability: 1.4.5 and later


Disable Automatic Window Closing

Snippet closes the window automatically when deactivated. If this is not the desired behavior, use this command: defaults write com.fuelcollective.snippet FCCloseMainWindowOnDeactivate -bool NO

To cancel this, enter defaults delete com.fuelcollective.snippet FCCloseMainWindowOnDeactivate.

Availability: 1.4.5 and later


Snippet Font Size

You can change the font size using this command: defaults write com.fuelcollective.snippet SnippetFontSize -float 11.0. The default value is 11.0.

To cancel this, enter defaults delete com.fuelcollective.snippet SnippetFontSize.

Availability: 1.4.5 and later