You can use the Preferences command to customize much of BBEdit's behavior. You can decide which windows are open when you launch BBEdit, set the default options for windows, set the default options for searches, and so on. This chapter describes BBEdit's extensive preference options.
The Preferences window provides control over many aspects of BBEdit's behavior. You can decide which windows should open when you launch BBEdit, set the default display options for windows, set default options for editing behavior and searches, and so on.
BBEdit 8 employs standard OS services to store its preference settings, bringing improved durability and performance. BBEdit's use of these services also makes it possible for you to modify preference settings directly using appropriate "defaults write" commands (see Optional settings via `defaults write'). However, the Preferences window remains the standard interface for making and changing preference settings.
You should not arbitrarily remove your BBEdit preferences file, as doing so will require you to re-activate the application with your product serial number, in addition to re-selecting any customized preference options you may have chosen.
If you chose to modify your preferences by means of "defaults write" commands other than those documented here, without explicit advice from Bare Bones Software technical support, you take responsibility for any adverse effects.
To open the Preferences window, choose the Preferences command from the BBEdit menu.
The small text area at the top left of the Preferences window gives you a brief description of the contents of the currently displayed preference panel.
The list along the left side of the window lets you select the preference panel to use.
BBEdit's Preferences window is non-modal: you can leave it open and change preference settings while you work, or close it at any time by clicking its close button or by choosing Close Window from the File menu.
Any changes you make to preference settings will be stored immediately, though not every setting will take effect immediately. Some options are only checked or applied at application launch, as mentioned in their descriptions.
The following sections describe each of the preference panels in detail.
The Application preferences control which application and system services BBEdit uses, when open files are verified, and various other global settings.
If you mark this checkbox and have a recent version of QuickTime installed, BBEdit will ask QuickTime if it recognizes any files that BBEdit does not. If QuickTime recognizes the file as one it can display, BBEdit will open it for viewing; otherwise, the file will be opened as "raw" text. This option is on by default.
This option controls whether BBEdit will display the Tools menu in its menu bar, which allows you to access BBEdit plug-ins (code modules that add functionality to BBEdit). Third-party plug-ins are kept in BBEdit's application support folders. See Chapter 2 to learn more about the organization of BBEdit's support folders, or Chapter 15 for information about plug-ins. Changes to this option will take effect the next time you launch BBEdit.
This option controls whether BBEdit will display the Text Factories menu in its menu bar. Changes to this option will take effect the next time you launch BBEdit.
Mark this checkbox to always show the complete pathname of recently opened files, rather than just their names, in BBEdit's Open Recent submenu. If a recent file is missing, only its name will appear, regardless of this setting. Also, if two or more files have identical filenames, their complete pathnames will always be shown to prevent ambiguity, regardless of this setting.
Mark this checkbox to enable autorepeat when typing key equivalents. This option is off by default. (According to the Macintosh Human Interface Guidelines, menu commands should not autorepeat. If you chose to enable this option, you do so forewarned.)
These radio buttons control the way selected text is displayed while tracking mouse movements during a drag-and-drop operation: choose Outline Only to have the selection displayed as an outline, or Translucent Image to have the selection displayed as visible, translucent text.
This option controls the font and size used to display text in browser list panes, including disk browser, search results browsers, etc. To change this option, click Set to bring up the standard Font panel, and choose the desired font and size. The default setting is 11 point Lucida Grande.
If you frequently make changes to files with another program while they are open in BBEdit, or you often edit shared files that might be changed by someone else, you may want to mark one or more of these checkboxes. If the option for Activating BBEdit is checked, for instance, BBEdit will check the modification date of each open document every time you switch to BBEdit, alerting you if any changes have been made to the file while BBEdit was not the frontmost application. Similar functions are available to perform this check after running an AppleScript, a BBEdit plug-in, or a Unix script, or activating a text window.
The effects of the Revert command (from the File menu), and of a file Reload (which occurs when a document is reloaded by a verify action) are now both undoable.
This text field lets you choose how many files appear on the Open Recent sub-menu of the File menu, and how many folders appear on the folder search pop-up menu in the Find Differences folder lists.
The Browser Display preferences control the initial appearance of BBEdit's built-in browsers for search results, compile errors, disk contents, and so forth.
For search results browsers, you can have BBEdit display either a hierarchical listing (where all the matches associated with a particular file are grouped under that file, using disclosure triangles similar to those in the Finder's list views to reveal or hide the match list) or a flat listing showing each individual match encountered on a separate line. In the former case, you can also tell BBEdit to expand all the file nodes initially, by checking Expand Listing. This preference also governs the default display of hierarchical or flat error listings in error browsers.
The Contextual Menu preferences control which commands BBEdit will present on its contextual menu. You can show or remove commands in any category by enabling or disabling the appropriate option.
The Differences preferences control the way the Find Differences command places its windows.
The Arrange Windows radio buttons let you choose which screen BBEdit uses to display Differences windows. You can choose the main screen, the largest screen, or the smallest screen.
When you mark the Use Two Screens checkbox, BBEdit displays the Differences window on the second screen. This option gives you the largest view of the items you are comparing.
Keep Windows Arranged provides control over whether BBEdit rearranges the windows being compared when you click a difference item.
The two Above/Beneath Compared Files radio buttons let you choose whether the differences window should be above or below the windows of the items you are comparing.
You can specify whether differences windows are arranged left to right or top to bottom using the Arrange Windows radio buttons.
When comparing multiple files, the Show File Icons checkbox determines whether the files' Finder icons are shown in the Differences window.
The Keep Windows Arranged option controls whether BBEdit should attempt to automatically resize and reposition windows during a Find Differences operation. The Hide Palettes option determines whether palettes will automatically be hidden during a Find Difference operation.
The Documents preferences control how BBEdit handles opening text documents and creating text windows.
You can specify whether newly created or opened documents always should be opened into the frontmost text window, or whether each document should be opened into its own text window.
You can specify whether documents opened from other applications should be opened into the frontmost text window, or whether each document should be opened into its own text window.
Examples of opening documents from another application include using the "Edit in BBEdit" command from an FTP client such as Interarchy, and double-clicking files in the Finder.
Choose this option to have BBEdit warn you when you attempt to close a window with more than one document in it. This warning will not occur if:
You can specify when a new text window will display the Documents Drawer: always, only if the window contains two or more documents, or never.
You can specify whether the Documents Drawer should be displayed on the left-hand or right-hand side of text windows by default.
You can specify whether the Next Document and Previous Document commands should select documents according to their display order, or in order of most recent use.
Choose this option to prevent the Documents Drawer from also gaining keyboard focus when you click in it. When this option is on, you will not be able to use typeahead or the arrow keys to move among open documents in the drawer.
The Editing: General preferences control the behavior of various general editing behaviors.
If the checkbox is turned on, clicking in the left margin of an editing window selects an entire line. (If you have line numbers displayed, via the Show Line Numbers option in the Text Status Display preference panel, you can click in the line number as well.) The pointer changes to a right arrow when it is in the left margin. Click and drag to select multiple lines. Double-click to select an entire paragraph; double-click and drag to select a range of paragraphs.
If this option is off, clicking in the left margin moves the insertion point to the beginning of the clicked line.
When this preference is turned on, you can double-click any opening or closing parenthesis, brace, or bracket-- ( ) { } [ ] --to select the entire range of text enclosed by a balanced pair.
To have BBEdit stop warning you when you are about to perform an action that cannot be undone, turn this checkbox off.
This option controls whether BBEdit selects delimiter characters (parentheses, braces, brackets, etc.) when you use the Balance command (either by choosing it from the Text menu or by double-clicking on a delimiter). This option is on by default.
If this option is turned on, the line number bar, cursor position display, and Go To Line commands in editing views will use line and character position numbers that correspond to the "hard" line breaks actually present in the document, rather than the soft-wrapped line breaks.
Additionally, when this option is on, line selection commands and gestures, including the Select Line command, triple-clicking, and click selection in the left margin, will treat only "hard" line breaks as line boundaries.
To have BBEdit leave extra empty space when you scroll to the end of a text view, choose Half Window or Full Window here.
This option allows you to choose the font sizes for both fixed width and proportional fonts at and below which BBEdit will not employ text smoothing.
The Editing: Keyboard preferences control BBEdit's response to the use of various special keys.
When this option is selected, holding down the Shift key with the Delete key makes the Delete key work the same way as the Forward Delete key on extended keyboards. This feature is particularly useful on PowerBooks.
To use the numeric keypad to move the insertion point, select this option.
start of line 7 |
up 8 |
scroll up 9 |
left 4 |
show selection 5 |
right 6 |
end of line 1 |
down 2 |
scroll down 3 |
You can use the Shift key with the keys on the numeric keypad to extend a selection. You can use the Command and Option keys with the 2, 4, 6, and 8 keys as you would the arrow keys.
To toggle the behavior of the keypad between moving the cursor and entering numbers, hold down the Option key and press the Clear key in the upper-left corner of the keypad. (This key is also labeled Num Lock on some keyboards.)
This option controls whether BBEdit should remove any existing leading whitespace from lines which it applies auto-indentation to.
Choose "Scroll to Beginning and End of Document" to have the Home and End keys perform these respective actions. This is the default setting, which reflects the standard key motion behavior in Macintosh applications.
Choose "Move Cursor to Beginning and End of Current Line" to have the Home and End keys perform these respective actions instead. This option may be useful for those accustomed to Windows editing key behavior.
These two checkboxes let you swap the meaning of the Option and Command keys when used with cursor navigation keys to move through a window's contents. You can set this separately for horizontal and vertical cursor movement. For details on using cursor navigation keys, see Chapter 4 and Appendix B.
If turned on, this option allows you to use the basic Emacs navigation keystrokes to move around in editing views. It is not a full Emacs emulation mode; rather, it is more of a comfort blanket for individuals with Emacs key bindings hard-wired into their muscle memory. See Appendix B, "Editing Shortcuts," for a list of the Emacs commands BBEdit supports.
If you turn on the Display Status Window option, a small palette will appear when you type an Emacs shortcut, indicating which command you have applied.
The Editor Defaults preferences control the behavior of newly created document windows and documents without saved state information. Many of the preferences in this panel are the same as those in the Text Options sheet and in the Text Options pop-up menu in the status bar. The difference is that the text options control the behavior of the active window, while the Editor Defaults preferences control the behavior of new windows.
When this option is selected, pressing the Return key in new windows automatically inserts spaces or tabs to indent the new line to the same level as the previous line.
To temporarily invert the sense of the Auto Indent option while typing, hold down the Option key as you press the Return key.
When this option is selected, BBEdit flashes the matching open parenthesis, brace, bracket, or curly quote when you type a closing one. This option is useful when you are editing source files, to ensure that all delimiters are balanced.
When this option is on, BBEdit automatically substitutes curly (or typographer's) quotes (" " ` ') for straight quotes (" ').
To type a straight quote when this option is selected (or to type a curly quote when the option is deselected), hold down the Control key as you type a single or double quote.
You should avoid using Smart Quotes when creating or editing HTML documents and email message content.
When this option is selected, BBEdit inserts an appropriate number of spaces instead of a tab character every time you press the Tab key.
This option shows or hides non-printing characters in the window. Select this option when you want to see line breaks, tabs, and gremlins (invisible characters). BBEdit uses these symbols to represent non-printing characters:
Symbol |
Meaning |
---|---|
Δ |
tab |
⋄ |
space |
· |
non-breaking space |
¬ |
line break |
¶ |
page break |
¿ |
other non-printing characters |
If this setting is selected (and Show Invisibles is active), BBEdit will display placeholder characters for spaces. Deselect this option to suppress the display of spaces, which will reduce clutter when you are displaying invisible characters.
Non-breaking spaces (typed by pressing Option-space) will not be displayed with a placeholder.
When this option is selected and the editing window contains a document in one of the languages that BBEdit knows how to parse, BBEdit displays keywords and other language elements in color.
The languages that BBEdit knows about are those listed in the Languages panel of the Preferences window. Remember that the document must be saved to a file and that the file must end with a suffix (extension) that maps to a language that BBEdit can parse.
You can select the colors that BBEdit uses for syntax coloring in the Text Colors panel of the Preferences window.
When this option is selected, BBEdit soft-wraps the text in the file to the right margin that you choose: the Page Guide, the window width, or a specific number of characters, as selected by the options below the checkbox.
This option controls the standard font and font size, and the number of spaces per tab, which BBEdit uses to display the contents of text windows. To change this option, click Set to bring up the standard Font panel, and choose the desired font and size, or tab width. The default setting is 9 point Monaco, with 4 spaces per tab.
The File Filters preference panel lists all the file filters you have defined for multi-file searching. You can create, edit, rename, or delete filters using the buttons on the right side of this panel. For more information on creating and using file filters, see Chapter 7.
The File Search preferences control the way BBEdit searches for files when you use the Open File by Name or Open Selection command from the File menu.
When this option is selected, BBEdit looks for all the files that match the entered or selected text. Otherwise BBEdit stops looking as soon as it finds the first file that matches the selected name.
When this option is selected, BBEdit does not search folders whose names are enclosed in parentheses.
The Search Folders box displays a list of folders which BBEdit will search in response to an Open File by Name or Open Selection command, or a Control-Tab to locate the corresponding source or header file. The contents of each listed folder will be searched recursively, i.e. the contents of any subfolders will also be searched.
To add folders to the list, do any of the following:
To change the target folder for an existing entry, select it from the list, click "Change", and choose a new folder using the directory selection dialog.
To remove folders from the list, select them, and click "Remove".
The Unix Search Paths box displays a list of folders which BBEdit will search in response to an Open File by Name or Open Selection command, or a Control-Tab to locate the corresponding source or header file. The contents of each listed folder will only be searched directly, i.e. without recursion.
Unix search paths are designed to make it easier to work with Unix source code, which uses include statements of the form
As a more concrete example: the canonical Unix include directory is "/usr/include". It contains its own subdirectories, but since Unix command line compilers do not usually do recursive searches, you need to qualify the include file's name if you want to include a file out of one of the subdirectories:
With the Unix Search Paths settings, you can add "/usr/include" to the list (actually, this is one of the factory defaults). When you select "sys/ioctl.h" and choose Open Selection, BBEdit attempts to construct a file path using each of the directories shown in the Unix Search Paths list. If one resolves to a file, BBEdit will open the resulting file. Thus, the partially qualified selection "sys/ioctl.h" resolves to
and the file opens.
The FTP Settings preferences let you change the default settings of some options in the Open from FTP/SFTP Server and Save to FTP Server dialogs.
Dragging the window proxy icon from an editing window corresponding to a file opened from an FTP server will drag that file's URL, rather than a representation of the local temporary file. To control whether the dragged URL includes the FTP account password, set the Include Passwords in Proxy URL Drags checkbox. This setting is turned off by default so that you do not accidentally create clippings containing passwords, as this may be a security risk.
Mark this checkbox to show files opened from FTP sites on the Open Recent submenu of the File menu. (If this box is not checked, the Open Recent submenu lists only local files.)
Mark this checkbox to make passive FTP mode (where the server determines the port number for the FTP connection) the default. Use Passive FTP whenever possible.
Mark this checkbox to display icons for the files in the Open from FTP/SFTP Server and Save to FTP Server dialogs. Since FTP servers do not provide Macintosh type and creator information, BBEdit determines the displayed icon based on the file's name suffix (.html, .sit, and so on).
Mac OS X does not currently provide any direct interface for configuring these suffix-to-type mappings. However, you can use Internet Explorer's File Helper preferences, or a third-party System Preferences pane such as RCDefaultApp for this purpose.
The Unix convention for creating invisible or hidden files is to begin their names with a period. Often, configuration files and scripts (such as .newsrc or .login) begin with periods so that they do not clutter most directory listings. This setting is off by default, so that you will not see such files in FTP listings. To display them, mark this checkbox.
This list displays the bookmarks you have defined for FTP servers you use frequently with BBEdit. Click Add to create a new bookmark, click Change to edit the selected bookmark, or Remove to delete it.
When adding or editing a bookmark, set the SFTP option in the Edit Bookmark dialog to have BBEdit connect to this server via SFTP; if the option is unchecked, BBEdit will use FTP instead.
If you have the Preferences window open, you will not be able to add bookmarks in the Open From/Save To FTP Server dialogs. To work around this, close the Preferences window before using the FTP dialogs to add new bookmarks.
The Glossary preferences determine how BBEdit handles glossary entries.
Click Ignore Trailing CR to have BBEdit strip off all white space from the end of a glossary entry when inserting it. This allows glossary entries to be inserted in the middle of a line, rather than as a block of text. You can use the #INLINE# cookie in a glossary entry to achieve the same effect, but only for that one entry.
Mark this checkbox to make BBEdit's glossary language-sensitive. If this feature is active, then each time you bring a window to the front, BBEdit automatically selects the first glossary set whose name maps to the same language as that window. For example, if the front window is an HTML document, BBEdit selects the first glossary set whose name ends in .html or .htm, or any of the other file suffixes mapped to HTML in the Languages preference panel. If there is no such entry, the active glossary set is unchanged.
The HTML Colors preferences let you choose the appearance of the Web Safe Colors palette.
You can choose from four layouts: 36 x 6 (a horizontal layout), 6 x 36 (a vertical layout), and two different VisiBone layouts, which organize the colors in a sort of circular layout that places similar colors close together. VisiBone 2 is a newer, more compact representation.
You can choose the size of the swatches to be displayed in the palette. The default is Small.
The Color Picker option allows you to choose whether the color swatch buttons in various HTML dialogs use BBEdit's Web-safe pop-up menu (the factory default) or whether clicking the swatch brings up the standard system color picker dialog. Holding down the Option key on your keyboard while clicking the swatch reverses the sense of the preference.
The HTML Markup preferences let you choose the format of tags generated by BBEdit's HTML tools.
You can choose to generate uppercase or lowercase HTML tags, or to obtain this setting from a Dreamweaver HTML Source Profile.
You can choose a Dreamweaver HTML Source Profile to use by clicking Choose and selecting an appropriate file in the dialog, or by dragging & dropping such a file into the path box.
You may choose to always enclose tag attributes in quote marks or only to enclose attributes when the HTML standard would require it.
You may choose whether BBEdit should use single or double quotes to enclose tag attributes when generating new tag attributes. (BBEdit will always preserve the quote characters in use when editing any existing attributes.)
If you are working with a document that does not contain a DOCTYPE specification or an XML declaration, you can specify whether BBEdit's HTML Tools should insert HTML or XML-style tags by selecting the appropriate radio button.
The New Line Before Block Start checkbox controls how the CSS markup and formatting tools place the opening braces for block markup. If the checkbox is on, you get this style:
H1
{
color: green;
}
If it is off, you get:
H1 {
color: green;
}
The Put Simple Rules on One Line checkbox will format a single line of CSS like this:
H1 { color: green; }
The Allow Short Hex Color Notation checkbox controls whether hex color codes which can be expressed in a 3-digit collapsed form are inserted that way, or are inserted in the normal 6-digit format.
This option allows you to control how the Close Current Tag command inserts the appropriate closing tag.
The HTML Palette preferences determine how the HTML tools floating palette is displayed.
Choose normal or short buttons. Using short buttons allows the palette to require less space vertically.
This list allows you to select which buttons are displayed on the palette. You can select a series of buttons by Shift-clicking their names in the display area, or a discontinuous group of buttons by Command-clicking each button name. After you make a selection, click Show or Hide to mark or unmark the selected buttons.
The HTML Preview preferences tell BBEdit how you prefer to preview HTML documents.
Choose to preview files with unsaved changes by saving the changes to a temporary file, by saving the current file just before previewing it, or by asking whether to save the file.
If you have set the Ask option, and choose Save when prompted, the file will be saved and then previewed; if you choose Don't Save, the preview operation will be cancelled and no changes will be made to the file.
This list displays all the Web browsers known to BBEdit. Browsers are shown by name and version number, in the same form in which they will appear in the Preview With submenu of the Markup menu. Any browser which runs under the Classic environment will be further labeled "(Classic)."
The browser list includes each individual browser application that is available on your Mac. For example, if you have Netscape 4.7.5 and Netscape 6.2.1 on your hard disk, both applications will be listed in the preferences and available for previewing.
You can use the Add, Remove, and Change buttons respectively to add or delete a browser from the list or update an entry by choosing a different version of the application. (The Remove button does not delete a browser from your hard disk, but only removes its entry from the preview list.)
The Find All button finds all available Web browsers that BBEdit recognizes and adds them to the list if they are not already there. If using this button does not add a browser which you know is available, you can add it directly with the Add button. (Sometimes, the system may not properly advise BBEdit of every browser which is present.)
The HTML Tools preferences set options for the HTML Tools.
Mark the Preserve File Dates checkbox to have modification dates remain unchanged when updating HTML files using the Update Tool.
You can have the HTML Syntax Checker warn you when an HTML element is implicitly closed. Examples of these sorts of tags are <P> and <LI>. The closing tags for these elements are optional in some HTML specifications.
You can likewise have the Syntax Checker warn you about missing spaces before the closure for empty XML elements.
You can also configure the Syntax Checker to skip specifically-marked blocks which begin with the comment <!-- #bbpragma ignore_errors="on" --> and end with the comment <!-- #bbpragma ignore_errors="off" -->. Among other things, this option may be useful in preventing known warnings where you must include non-standard markup for compatibility with old browsers.
Choose the type of warnings to be issued by the HTML link checker.
Remote Links flags each offsite link so that it can be checked for validity manually.
Incorrect Pathname Case flags situations where the name of a file as specified in an HTML document does not exactly match the name of the file on disk, which can cause problems when files are uploaded to servers with a case-sensitive file system.
Folder Aliases in URL Path warns you if any file paths contain aliases rather than real folders.
File Out of Server Scope controls whether the link checker will issue out of server scope warnings for links that fall outside of the server scope for the document being checked. In general you will want to leave this option on and make sure your web site preferences are properly configured. If, however, you often check transient content (such as help files or readme files) which does not merit adding a separate site configuration, you may want to turn this warning off.
The HTML Web Sites preferences let you tell BBEdit about the Web server where your pages will be hosted.
You can define as many separate web sites as you like. The Add button brings up a Web Site Settings dialog (see below) for adding a new site to the list and specifying its properties. When a site is selected in the list, the Change button displays this same Web Site Settings dialog, allowing you to modify the existing settings for that site; the Remove button deletes the selected site from the list. The list must always include at least one site; the Remove button is disabled when only one site is listed, preventing you from deleting that last site. The check mark identifies one site in the list as the default site; you can change this setting by selecting another site and clicking the Make Default button.
All of the HTML Tools commands that generate or operate on links, such as Tag Maker and Check Links, will recognize and take account of the presence of multiple sites in the HTML Web Sites preference panel; see the descriptions of these tools in Chapter 11 for further details.
The Web Site Settings dialog displayed by the Add and Change buttons is shown below.
Use this text field to enter the name by which the web site will be listed in the HTML Web Sites preference panel. BBEdit also uses this name in the Web Site pop-up menu of the New HTML Document dialog (see "Creating a New Document" in Chapter 11).
Enter the URL of your web server here, such as "http://www.example.com/" in the figure. BBEdit uses this information to determine which links are on (local to) your server.
Enter the server path of your site's main page here. For example, if your web site is at "http://www.example.com/foo/bar/", you would enter
"http://www.example.com/" for the Web Server Name (as noted above) and
"foo/bar/" for the Site Path on Server.
Specify the default name used by your server for the document that is sent to a web browser when a browser accesses a directory without specifying a file name. Most servers use "index.html", "default.html", "main.html", or "home.html".
Use the Set button to select the folder that is the root of your web site on your local hard disk (or on a mounted server volume). You can also drag the folder's icon onto the box to the left of the Set button.
Use the Set button to select the folder that contains your HTML document templates and include files. You can also drag the folder's icon onto the box to the left of the Set button.
If you have a web server running locally, you can preview HTML pages through it by activating this option, and entering the base URL for your preview server. (To start the built-in web server, turn on the "Personal Web Sharing" option in the Sharing panel of the System Preferences.)
When you are configuring a new web site, if the local site root folder is located within the "Sites" folder of your home folder (~/Sites/), BBEdit will create an appropriate local http URL and enter it in this field. Otherwise, you can specify the local http URL for your site root folder.
If your web site folders are not located within ~/Sites/, or if you want to use virtual domains, need to enable PHP, etc., you will need to modify the Apache config file. Such configurations are not directly supported through the HTML Web Site preferences.
The Languages preferences allow you to configure how BBEdit maps file names to language types (e.g. ".html" to HTML), and to configure certain parameters for each supported language.
The list of installed languages includes both languages intrinsically supported by BBEdit, and those provided via additional language modules.
Choose a language and click "Make Default" to use that language as the default when creating new text documents, and when opening text documents for which the language cannot otherwise be guessed (by mapping the file's suffix or examining its content). The default setting is "(none)".
To configure the comment-start and comment-end strings used by the Un/Comment command on the Text menu for a particular language, choose it from the list, click "Options", and edit its comment strings as desired.
The comment strings used for CSS are fixed and cannot be edited.
By default, BBEdit offers a set of file suffix-to-language mappings which covers the common usages for each supported language.
To add a new suffix mapping:
The Add Suffix dialog appears.
You can use wildcards in the suffix to indicate single characters (?), any number of characters (*), or a single digit (#). For example, "page.#html" could map to a different language from ".html".
To change an existing suffix mapping:
The Change Suffix dialog appears.
To delete a suffix mapping:
To reset all suffix mappings to default settings:
The Software Update preferences control the integrated version-checking capability built into BBEdit.
The Check Automatically checkbox controls whether BBEdit automatically looks to see if there is a new version available from Bare Bones Software. Regardless of the setting of the checkbox, you can always check manually by clicking the Check Now button.
The version checking mechanism used by BBEdit protects your privacy. It works by requesting information about the currently available version from Bare Bones Software's web server. The server will log the date, time and originating address of the request, and which versions of the OS and BBEdit you are using. This information is used to guide the future development of BBEdit; it is not personalized and will not be disclosed.
The Source Control preferences panel allows you to configure settings for CVS and Perforce projects.
To add a new CVS project:
The Configure CVS Repository dialog appears.
To add a new Perforce project:
The Configure Perforce Repository dialog appears.
To add a new Subversion project:
The Configure Subversion Working Copy dialog appears.
To change the configuration of an existing project:
The Configure CVS Repository, Configure Perforce Repository, or Configure Subversion Repository dialog will appear, as appropriate.
To delete an existing project:
To set the options which will be applied when performing diff operations:
You can override the client root inherited from BBEdit's environment for any P4 configuration by checking the "Override" option in the Configure Perforce Repository dialog and dragging your desired root folder into the path region below the checkbox.
Perforce passwords are stored in the current user's Keychain.
The Spelling preferences control whether BBEdit uses the Mac OS X system spelling checker, or an external spelling checker.
This option specifies that BBEdit should use the Mac OS X system spelling checker when you choose the Check Spelling command from the Text menu. You can set the highlight (underline) color that BBEdit uses to identify questioned words by clicking on the color button and choosing a color via the standard OS color pickers. Click the Reset to Factory Color button to restore the default setting. (You may find it useful to change the highlight color if you have defined a nonstandard color scheme via the Text Colors preferences.)
When this option is selected, BBEdit uses an external spelling checker when you choose the Check Spelling command from the Text menu. The external spelling checker must support Apple's Word Services Suite.
To set the external spelling checker, click the Set button and select the application's icon. You can also drag the spelling checker icon to the path box to the left of the Set button.
The Startup preferences control what BBEdit does when you launch it, or when you click on BBEdit's Dock icon or double-click its icon in the Finder and there are no open windows (even if the application is already running).
This option specifies that BBEdit should not open any windows or perform any other actions.
This option specifies that BBEdit should open a disk browser starting at your home directory.
This option specifies that BBEdit should open an FTP browser.
This option specifies that BBEdit should bring up the standard Open dialog, allowing you to select and open a file.
This option specifies that BBEdit should bring up the Open from FTP/SFTP Server dialog, allowing you to connect to an FTP server and open a file.
You can hold down the following modifiers during launch to override these actions.
Modifier(s) |
Function |
---|---|
Option |
Suppress startup items only |
Shift |
Disable all plug-ins, tools, external services, and startup items |
The Text Colors preferences let you select the colors that BBEdit uses when the syntax coloring option is on. You can also select a custom window background color and text color, as well as custom highlight colors, which will apply to all text windows, although we feel compelled to point out that there are good reasons why the default Macintosh text color scheme is what it is.
You can use this sliding control to adjust the contrast level of the page guide display region. (See Show Page Guide..)
You can turn on syntax coloring globally by setting the Syntax Coloring option in the Editor Defaults preference panel. You can choose the colors which BBEdit uses for various content elements, such as keywords, string constants, etc., in the Text Colors preference panel.
For HTML content, you can turn on the Color Attributes Separately option to have BBEdit use different colors for HTML attribute names, attribute values, and processing instructions, in addition to anchor, image, and other tags. If this option is turned off, BBEdit will color HTML attributes identically to their corresponding tags.
The color bars show the colors that BBEdit uses to display different interface and language elements. To change colors, click the color box. BBEdit will open the system Color Picker dialog box that you can use to select a new color. To restore all the colors to their default settings, click the Reset to Factory Colors button.
When opening documents, BBEdit can automatically recognize and appropriately handle files that use character set encodings other than Mac Roman, including multi-byte character sets.
The Text Encodings preferences panel presents an alphabetical list of every character set encoding available in Mac OS X, and allows you to choose which of these items should appear in the pop-up menus that list encodings. These pop-up menus are:
To include an encoding in those menus, select it and click Enable. To remove an encoding from those menus, select it and click Disable. To add all the encodings or remove all the encodings from the menus, use the Enable All and Disable All buttons. To restore the contents of those menus to the factory defaults, use the Restore Defaults button.
All the Unicode encodings are permanently enabled and cannot be turned off.
To keep the length of the encoding menus manageable, you should add only those encodings which you use frequently.)
The Text Files: Opening preferences control BBEdit's behavior when it opens files.
When this option is selected, BBEdit translates DOS or Unix line breaks when opening a file. Otherwise BBEdit leaves the original line breaks untranslated.
These settings tell BBEdit how to deal with files whose type and creator codes are not set. Usually, such files are created by Unix programs, but they may also be downloaded from remote servers. You can choose:
Mac OS X includes a default set of mappings, but provides no direct interface for configuring them. However, you can use Internet Explorer's File Helper preferences, or a third-party System Preferences pane such as RCDefaultApp, for this purpose.
You should select whichever setting makes the most sense for the sorts of files you work with. For example, if you often download or work with files which lack filename extensions, but you know that they always contain text, you can select "Assume It's Text".
When this option is selected, BBEdit will use the character set specified in the appropriate HTML meta tag or XML declaration to determine a file's encoding when opening the file. Also, when this option is on, changing an HTML or XML document's character set with the Character Set markup command will adjust the file's encoding to match (as indicated on the Encoding submenu of the File Options popup in the status bar), and changing the file's encoding will adjust the character set declaration (if one exists). This option is on by default.
When this option is off, then BBEdit does not attempt to use the character set specified in the HTML meta tag or XML declaration, but will follow the usual procedure for determining the file's character set. (See "Choosing the Encoding for a Document" in Chapter 3 of the user manual.) The only reason you might want to turn this option off is if you routinely put characters into your document that cannot be represented in the declared character set, e.g. if you will be post-processing the file by some other means which modifies these characters.
This menu determines which character set encoding to use when BBEdit cannot determine the proper encoding by examining the file. This setting also establishes the default setting of the "Read As:" pop-up menu in the Open dialog.
When this option is selected, BBEdit warns you if you open a UTF-8 file that contains an invalid UTF-8 character sequence.
When this option is selected, BBEdit honors state information that may be stored in a file. The following suboptions let you fine-tune which state information BBEdit honors.
When this option is selected, BBEdit restores the window of the document to the same position as when the file was saved. Otherwise BBEdit opens the window in its default position.
When this option is selected, BBEdit restores the font information stored with a document. Otherwise it uses the default font settings.
When this option is selected, BBEdit restores the insertion point or selection range to the same position as when the file was closed. Otherwise the insertion point is at the beginning of the file.
Emacs (the popular Unix text editor) supports a convention in which you can define Emacs-specific settings in a block of text near the end of the file, or in the first line of the file. BBEdit now recognizes the Emacs variable block, and can optionally read and set certain variables.
If this option is selected, BBEdit will use the "coding" variable, whose value is the Internet text encoding name in which the file is written, e.g. "iso-8859-1" or "utf-8" to interpret the file's contents when opening it.
When this option is selected, BBEdit restores the scroll bar position to the same position as when the file was closed. Otherwise BBEdit opens the file with the top of the file showing.
When selected, BBEdit reads document-specific options, such as soft wrap, show invisibles, and line numbering, from the saved state information.
The Text Files: Saving preferences control BBEdit's behavior when it saves files, including file backup settings.
When this option is selected, BBEdit will always add a line break at the end of the file if it does not already end with one.
These options let you choose what kinds of line breaks BBEdit writes when you save the file. You can choose:
Additionally, if the Use Unicode Line Breaks option is selected, BBEdit will use Unicode line breaks by default for newly created (or converted) Unicode documents, instead of the chosen platform-specific line breaks.
This menu determines which character set encoding BBEdit will save a document with, if the document does not contain an encoding specification.
Select this checkbox to tell BBEdit to make automatic backup copies of every file as you save it. This preference setting establishes the defaults for newly created documents, and for documents in which there are no saved backup settings.
If you prefer that BBEdit create backup files in the same folders that your documents are already saved in, choose the option for Use Document's Folder. This is the default setting. If you prefer to save backups in a different folder, choose the Use Folder setting instead. You can click the Choose button to select the desired backup folder using a dialog, or just drag the folder to the box.
Even if you do not set BBEdit to perform general backups here, you can still set backup options for individual files by using the Backup Options command in the File menu.
Select this option to have BBEdit store document state information. A document's state information includes various display properties, such as window position, font settings, etc. This information is now stored centrally by BBEdit; it is no longer a property of a document's file. You can control how BBEdit makes use of state information via the Honor Saved State options in the Text Files: Opening preferences panel.
Emacs (the popular Unix text editor) supports a convention in which you can define Emacs-specific settings in a block of text near the end of the file, or in the first line of the file. BBEdit now recognizes the Emacs variable block, and can optionally read and set certain variables.
If this option is selected, BBEdit will change the value of the "coding" variable in the variable block to be the Internet text encoding name which corresponds to the document's encoding (and will write out a variable block if necessary).
The Text Printing preferences control how BBEdit prints your documents.
To set the default printing font, click the Default Font button. BBEdit opens the Font panel, in which you can specify the font and font size, and the width of tab stops. The current printing font settings appear in the display box to the right of the button.
When this option is selected, BBEdit uses the document's font and tab settings when printing.
When this option is selected, BBEdit draws a box along the edges of the printed text.
When this option is selected, BBEdit prints the page number, the name of the file, the time and date printed in a header at the top of each page.
When this option is selected, BBEdit prints the full pathname of the file being printed in the header.
When this option is selected, BBEdit prints line numbers along the left edge of the paper.
When this option is selected, BBEdit leaves a one-inch margin along the left edge of the paper. Use this option if you usually put your pages in three-ring binders.
If this checkbox is marked, BBEdit prints colorized text in color. You should generally use this option only on color printers, as colorized text may come out in difficult-to-read dithered shades of gray on black-and-white printers.
The Time Stamp options let you choose whether the date that appears in the header is the date that the file was last modified or the date that the file was printed.
The Print Rubber Stamp option allows you to specify a text string which will print on your documents in enlarged, low density (grey) form using the selected font.
The Text Search preferences let you set default options to use with the Find command.
When this option is selected, BBEdit displays a dialog telling you how many replacements it made when you perform a Replace All operation on a single file.
Mark this checkbox to have BBEdit remember the state of the Start At Top checkbox in the Find & Replace dialog from one invocation to the next.
When this preference is turned on, and Use Grep is turned on in the Find & Replace dialog, BBEdit will apply syntax coloring to grep search and replace patterns.
This list displays all the grep patterns (regular expressions) you have defined for use in the Find & Replace dialog's Patterns pop-up menu. Click Add to add a new one, click Change to edit the selected pattern, or click Remove to delete the selected pattern.
If you have the Preferences window open, you will not be able to add grep patterns from the Find & Replace dialog. To work around this, close the Preferences window before using the Find & Replace dialog to add new grep patterns.
The Text Status Display preferences let you choose which icons and pop-up menus appear in the status bar of BBEdit text windows.
The following options determine which controls and navigation items BBEdit should display by default in text windows and text panes.
Enable this option to have BBEdit display the status bar by default. (You can always show it or hide it independently for each window.)
Enable this option to have BBEdit display the multiple-document navigation bar by default. (You can always show it or hide it independently for each window.)
This option adds a panel at the bottom-left corner of the window that displays the location (line and column) of the insertion point, or the endpoint of a just-changed selection range (if the cursor has not been moved yet after the change).
This option displays the name of the function the insertion point is in (if any) at the bottom-left corner of the window.
The following options control the presence and default position of text area visual indicators.
Enable this option to have BBEdit display the Page Guide, which is a uniform light grey boundary region starting at the specified character width.
Enable this option to have BBEdit display tab stops as vertical grid lines within the content area of text windows, using the tab width set in the Fonts panel.
These options let you choose which controls should appear on the status bar. To quickly enable or disable the visibility of all controls, you can click either Show All or Hide All, respectively.
This option displays the Function pop-up menu, which lists the functions (for source code files) or named anchors (for HTML files) in the document, allowing you to jump directly to any function or anchor.
This option displays the Text Options pop-up menu, which allows you to set wrapping, display, and editing preferences for the current window, as with the Text Options command in the Edit menu.
This option displays the Mark pop-up menu, which lets you define and locate named markers in a document.
This option displays the File pop-up menu, which lets you set end-of-line and other compatibility options.
This option displays the Insert pop-up menu, which lets you insert the contents of another text file (or a toolbox call template) into the current document.
This option displays the Path pop-up menu, which shows the location of the file being edited within the folder hierarchy. You can choose any folder from this menu to open it in the Finder.
This option displays the Info button, which opens an Info window showing the file's path, along with character, word, line, and page counts for the file and the selection.
This option displays the Super Get Info button, which asks Super Get Info to display file information pertaining to the current document. This option is available only if you have Super Get Info installed on your system.
This option displays the Document Icon button, which serves as a proxy for the document file. You can click the icon to reveal the current file in the Finder, or drag it anywhere the original file can be dragged.
This option displays the Document Drawer Toggle control at the right-hand side of the status bar.
The following preference options control how the Function pop-up menu (left) in the status bar behaves.
When this option is selected, the Function pop-up menu includes the files named in #include directives.
The Tools preferences control the way BBEdit integrates with programming tools, such as AppleScript editors, development environments and Toolbox references.
To set the script editor for use with the Open Script Editor command in the Script menu, do one of the following:
The Coding Tools and External Editors options let you select which development environments you plan to use with BBEdit. Turning off the tools you do not plan to use will allow BBEdit to start up faster. However, in order for changes you make to any of these options to take effect, you must quit and relaunch BBEdit.
Supported environments include BBEdit's built-in HTML tools, a variety of programming packages, including Apple's Xcode, Metrowerks CodeWarrior, and Absoft Fortran, and the Dreamweaver visual HTML editor from Macromedia. BBEdit also integrates with any Unix scripting tool, such as Perl, Python, Ruby, or shells, as well as the CVS and Perforce source control systems.
In order to select any of these options, you must have the appropriate package(s) installed, e.g. the Apple Developer Tools for Xcode, or the p4 command line tool for Perforce.
In order for CVS commands to be operative, you will need to first configure your system to allow repository access from the command line. The details of how to do this vary from one installation to another; consult your local CVS expert for specifics.
The Default Shell pop-up menu lists all Unix shells currently known and available on your system, allowing you to choose one as your preferred shell for use with shell worksheets. (Shell worksheets are discussed in detail in Chapter 14.)
The "Install Command Line Tools" button installs the current version of the "bbedit" and "bbdiff" tools for invoking BBEdit from the Unix command line. The first time you run BBEdit after installation, it offers to install these tools for you. If you choose not to do so, you can use this button in the Tools preference panel to install the tools at a later time.
If the tools are already installed, the button will update them to a newer version if one is available; it will not overwrite existing versions of the tools with older versions. See Chapter 14 for further details on the "bbedit" and "bbdiff" command line tools.
The Unix Scripting preferences control how BBEdit handles files which are run as Unix filters or scripts.
Mark this checkbox to have BBEdit always send UTF-8 to Unix filters, and interpret Unix script output as UTF-8. This precludes the previous need for BBEdit to create and execute a temporary copy of the script file, which could result in different behaviors for a script when run inside and outside of BBEdit.
Mark this checkbox to have BBEdit post an alert when you attempt to run a filter or script which does not have Unix line breaks. Although BBEdit transparently handles this case, most external environments do not; thus, it is recommended that you leave this option on.
Mark this checkbox to have BBEdit use Affrus in preference to the command line Perl Debugger. Affrus is an integrated Perl development environment from Late Night Software.
If you choose this option, BBEdit will pass complete environment parameters and control to Affrus, but will not attempt to retrieve output.
The Windows preferences control the size and appearance of both newly created windows and windows that do not contain their own display state information. (See the State panel to tell BBEdit how to store state information in files.)
Mark this checkbox to always expand windows to their maximum size when opening them, regardless of their saved window size state.
When this option is selected, BBEdit keeps windows as close to their original location as possible when you zoom them.
This pop-up menu lets you specify the maximum width of a zoomed window. The default setting is Classic Display.
On systems with multiple monitors, this pop-up menu lets you choose which screen BBEdit should use when zooming. You can choose the main screen (the one containing the menu bar), the nearest screen (the one containing most of the active window), the largest screen, or the smallest screen.
Mark this checkbox to show the complete pathname of open documents, rather than just their names, in BBEdit's Window menu. If two or more files have identical filenames, their complete pathnames will always be shown to prevent ambiguity, regardless of this setting.
Mark this checkbox to group windows of the same kind together in the Window menu. For example, text editing windows, disk browsers, and search results browsers are all different kinds of windows. Within each group, windows will be sorted as determined by the Sort Windows By radio buttons (see below).
Mark this checkbox to have BBEdit automatically assign shortcut key equivalents of Command-0 through Command-9 to text windows or shell worksheets as these windows are created. If you leave this option off, these key equivalents will become available for assignment to other menu items via the Set Menu Keys command.
This option controls the order in which documents are listed on the Window menu, and in text window submenus. Select Name to list documents alphabetically by name, or Creation Order to list documents in the order they were opened in the current BBEdit session.
This option also controls the order in which documents are displayed in the documents drawer, and on the navigation bar menu.
These icons determine how BBEdit stacks windows: down and to the left, straight down, directly atop, or down and to the right. BBEdit stacks windows down and to the left by default.
When this option is on, BBEdit leaves room for any open floating palettes when creating or rearranging windows, if the palettes are stacked together such that at least one is against either the right-hand or left-hand edge of the screen. This option is on by default.
In addition to the preference settings which can be made through the Preferences window, BBEdit permits the following additional modifications to its behavior, which you can make by issuing an appropriate "defaults write" command.
If you never use BBEdit's FTP/SFTP-related commands, such as Open from FTP/SFTP Server, Save (A Copy) to FTP/SFTP Server, etc., you can remove them from the menus by issuing the following command in the Terminal, and then quitting and relaunching BBEdit.
If you have applied this change, but want BBEdit to display the FTP/SFTP menu commands again, issue the following command in the Terminal, and then quit and relaunch BBEdit.
Ordinarily, BBEdit will not add files to the Open Recent menu if they are located in the system temporary directories (/tmp or /private/tmp). However, if you routinely work with such files and want them to appear on the Open Recent menu, you may issue the following Terminal command.
If you have applied this change, but no longer want to have such files added to the Open Recent menu, issue the following command in the Terminal.
If you need to control which cvs, p4, or svn tool BBEdit should use, you can do so by issuing any or all of the following Terminal commands.
For CVS:
For Perforce:
For Subversion: