INI files

From BBEditExtras
Revision as of 17:34, 27 November 2012 by Admin (Talk | contribs) (Reverted edits by Wingramo (talk) to last revision by Siegel)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

BBEdit supports .ini-style preferences files, primarily for globally setting expert preferences without relying on defaults write; but they can also be used to determine preferences on a directory-specific basis. A good description of the INI file format can be found [on Wikipedia].

To use directory-specific settings, write a well-formed INI file, whose keys and values are the same format as those in ~/.bbedit. The file may be named anything, as long as its name ends in ".bbeditSettings". The settings specified in that file will override all others and will apply to any file that is opened from the same directory as the settings file, as well as any file opened from a subdirectory of the settings file. So, given this arrangement of files:


Any settings specified in Foobar.bbeditSettings will apply to mumble.c, as well as all of the files in misc, but not to super.h.

If no directory-specific file exists, BBEdit will look for ~/.bbedit, and if it exists it will be examined for a matching preference key.

Note: Beginning with BBEdit 10.1.1, directory-specific settings files are enabled only if the EnableSettingsScan expert preference is turned on:

defaults write com.barebones.bbedit EnableSettingsScan -bool YES

Also, for performance reasons, directory-specific settings file discovery is disabled on remote file server volumes. You can re-enable it thus, if desired:

defaults write com.barebones.bbedit DisableSettingsScanOnRemoteVolumes -bool YES