BBEdit 9.2 Release Notes
This page documents all the new features, enhancements and visible changes included in the BBEdit 9 release.
For information about the changes included in any specific version of BBEdit, please see the release notes archive.
For detailed information on using any of BBEdit’s features, please refer to the user manual (choose “User Manual” from BBEdit’s Help menu).
BBEdit 9 requires Mac OS X 10.4 or later.
This version is a Universal application: it runs natively on both Intel-based and PowerPC-based Macs.
The Scratchpad window’s purpose is to be a space where you can manipulate text by performing transforms, manual edits, or batches of copy/paste.
It is ideal for quickly beating text from one source into submission before pasting it elsewhere.
The Scratchpad window automatically saves its content and state, eliminating those pesky “Save Untitled 237?” warnings when closing a window, or quitting BBEdit.
The Scratchpad is also available from BBEdit’s dock menu.
Finally, there is a new item on BBEdit’s Services menu: Append Selection to Scratchpad. This command will take the selected text, and place it at the end of the scratchpad, attempting to preserve any selection that was previously present. The Scratchpad window does NOT need to be open to use this command. Any text appended in this fashion will be present the next time the window is opened.
The “Passive” setting for FTP is no longer used. When transferring, BBEdit will first attempt a passive connection; if the server does not support passive transfers, BBEdit will then attempt a non-passive (PORT) connection. Thus, the “Passive” setting is gone from the FTP preferences, FTP browser, Save to FTP dialog, and the scripting terminology for FTP commands.
diff tool for generating
the difference ranges displayed in the application. This should
result in more usable results.e.g. $Author: Jim Correia$ -> $Author$
This means that “ignore RCS keywords” isn’t literal, but it does what you’d expect.
MinimumLinesForBlockFold preference.puts "d#{"rie"}w".reverse
... should show only "d#{"rie"}w" colored as a string when
in a Ruby file (new module).
then at the end of if or
elsif statement.tags” in each folder in the chain from
the current document’s folder up to the root of the file
system. This improves symbol lookups for projects that
aren’t structured exactly like ours. :-)There are no controls to force syncing, or provide any sort of user control over what does or does not sync. Just be patient, and don’t try to rush the sync engine. :-)
bbedit foo.h followed
by an Open Counterpart command will open foo.cp if it can be
found using the standard rules.If a NOS Glossary folder is detected, it is backed up, removed, then replaced with the latest Clippings folder.
#foo.txt#”. If “Preserve file name extension” is turned on, the
snapshot’s name will be “#foo#.txt”.-*- make-backup-files: 1 -*- —> always back up this file
-*- make-backup-files: 0 -*- —> never back up this file
If the first letter of the variable’s value is “y”, “t”, or “1”, the value is “yes”, otherwise it’s “no”. These are all synonymous:
make-backup-files: yes
make-backup-files: y
make-backup-files: true
make-backup-files: t
make-backup-files: 1backup-inhibited” variable, and its value is true (see
above), then the file will never be backed up, even if “Make
backup before saving” is turned on in the global
preferences.
It really only makes sense to specify “backup-inhibited: 1”,
since otherwise the file would be backed up if the global
pref is on, and not otherwise.
A project is the modern expression of the old “File Group” feature, but much more useful, chiefly because project windows now include an editing view: click on a file in the list on the left, and it appears for editing in the pane on the right.
To create a new project, choose File -> New -> Project… You will need to decide where to place your project on disk; thereafter, the project document will autosave as necessary.
In the project window, you can hide the top toolbar as desired. If the toolbar is hidden, the action buttons in the lower left corner of the file list remain useful for manipulating the project’s members.
txmt:” URL scheme. This allows properly formed
“txmt:” URLs generated by the Ruby On Rails “FootNotes”
plug-in (and some others) to open files in BBEdit and
(optionally) select a requested line and column. (NB: If the
system doesn’t correctly recognize BBEdit as an allowable
handler for such URLs, RCDefaultApp is a good tool for adjusting
the bindings.)Also, option-clicking on a close widget in the documents drawer will close all the text documents in that window. (MDI text windows will also close as a side effect, but project windows will remain open.)
There is a new command on the view menu “Show/Hide Editor” which can be used to toggle the embedded editor visibility in disk browsers and results browsers.
The toggle editor button in the action bar at the bottom of the file list can also be used for this purpose.
When hiding the embedded editor, the associated document will be removed from the window (and closed, after prompting you, if it was not open elsewhere.) Because of this potential need for user interaction, you cannot collape the editing view entirely by dragging the view splitter; you must use the button, menu command (or in the case of results browsers, a double click on the view splitter.)
src attribute are
now listed in the function popup (those with src are already
listed in the “includes” popup). This is similar to the STYLE
entry for stylesheets: functions and objects added to the
function popup as a result of the script tag are indented
beneath the script tag’s entry, to suggest containment.There are new Find and Multi-file Search windows; where they overlap, they provide a consistent and modeless interface to BBEdit’s legendary text search and replace capabilities.
If you’re familiar with the old Find dialog, you’ll generally feel at home, but there are some important differences and additions of which you should be aware:
“Selected text only” affects only the “Find All” and “Replace All” operations: if there is a selection range in the front document, this option will search only the selection range if turned on, or the entire document (starting from the top) if turned off.
“Wrap around” affects only the “Next”, “Previous”, “Replace”, and “Replace & Find” operations: if the search reaches the end of the document (or the beginning, if doing a “Previous”), then “Wrap around” will continue the search from the appropriate end of the document.
The factory defaults for these keys are as follows:
| Case sensitive | Control-shift-N |
| Entire word | Control-Shift-E |
| Grep | Control-Shift-G |
| Selected text only | Control-Shift-S |
| Wrap around | Control-Shift-W |
| Open search history | Control-Shift-H (new) |
| Open saved patterns | Control-Shift-P (new) |
If you are in the habit of assigning keyboard equivalents to saved clippings, it’s possible that these defaults may overlap with your clippings. If so, you can of course change the commands from the factory defaults.
If you find yourself more comfortable with the old interface, you can continue to use it by turning on “Use modal Find dialog” in Preferences -> Text Search.
When the editor is hidden, the projects list works as it did in previous releases. That is
When the project editor is visible, the project list can either work the same was as it does when the editor is hidden, or it can work in “single-click” mode.
There are two additional secret preferences which control this behavior.
Projects:ProjectsListCanAcquireKeyboardFocus -> BOOL -> NO
Projects:OpenItemsOnSingleClick -> BOOL -> YES
Having the list not accept keyboard focus, among other things, avoids “dancing focus” when opening items via single click.
When the single click setting is set, most single clicks will open the associated document in the attached editor, and put keyboard focus in the editing view.
Certain single clicks don’t result in an open action. (I’m specifically not listing them all here, but the behavior has been carefully designed so that it will feel right in usage. Examples include clicks which would require we spawn a window, clicks which extend the selection, etc.)
Note that this transformation does not operate in the reverse direction; if you get the text encoding property and explicitly compare the name, you will need to update your script.
FIXME and TODO items in the
function popup. Only ”//” comments are searched, and the comment
must start with one of the following: “FIXME:” “FIXME!” “FIX-ME:”
“FIX-ME!” “TODO:” “TODO!” “TO-DO:” or “TO-DO!”. The text added to
the function popup starts with the first character of the FIXME or
TODO and ends with the last non-white character on the same line.
Examples:
// FIXME This little bug could erase the intertubes.// TODO! Add support for Apple's "Crash Only When Convenient"There is an additional command “Open in Additional Window” which will open the current document (or selected documents when invoked from the documents drawer) in an additional window that can be edited side by side with the original document.
Both commands are only available for text documents.
BBEdit can now figure out completions for symbols as you’re editing. The preference for controlling when this happens is in the “Editing: General” preferences:
If you pause briefly while typing, BBEdit will figure out the completions for what you just typed, and display them.
The delay can be adjusted from the command line if desired:
defaults write com.barebones.bbedit Editor:AutoCompleteDelay -float 0.5
# sets the auto-complete delay to half a second
Completion will only take place when using a manual completion command (see below).
Automatic completion can be turned on and off on a per-language basis (in the Languages preferences) if desired. It is off by default for the “Log File” and “Data File” languages.
Completions can be derived from a variety of sources, including (in no particular order and without limitation):
Completion may be triggered at any time (whether or not automatic completion is enabled) by using the “Complete” menu command on the Edit menu. By default, F5 is assigned to this command; you can change this equivalent (as usual) by using the Menus preferences.
Note: Text completion completes clippings in the same way that the “Insert Clipping” command used to (and still does). So, the behavior of F5 should be indistinguishable if you were used to using it to complete clippings.
You can also use the Escape (“Esc”) key to invoke text completion. This is off by default, and may be turned on using the command line, as follows:
# allow the Escape key to invoke the "Complete" command
defaults write com.barebones.bbedit Editor:UseEscapeKeyAsCompletionTrigger -bool YES
Note: Because the Escape key has a special meaning when “Use Emacs key bindings” is turned on (Editing: Keyboard preferences), if you choose to use the Escape key as a completion trigger, you will have to press it twice to invoke completion in this case.
When these actions are enabled, holding down the option key while pressing the tab key will bypass the special actions and insert a tab character.
In all cases, if the special action is not appropriate in the current context, pressing the tab key will result in the default behavior (insert tab character).
The color may be changed on a per-language basis in the Languages preferences: double-click on the language’s name in the list and examine the Colors tab in the resulting sheet.
BBLMPredefinedNameList key appears in the module’s
property list, it is an array of strings, each of which is a
predefined name. (This key is mutually exclusive with
BBLMPredefinedNameFileName; you may use one or the other but
not both.)BBLMPredefinedNameFileName key appears in the
module’s property list, it is a string which names a text
file in the module’s Resources bundle directory; the file
contains one predefined name per line. (This key is mutually
exclusive with BBLMPredefinedNameList; you may use one or
the other but not both.)BBLMSupportsPredefinedNameLookups appears in the
module’s property list and is TRUE, BBEdit may call the
module with the kBBLMMatchPredefinedNameMessage. The
parameters for this message are the same as for
kBBLMMatchKeywordWithCFStringMessage.Added a couple of new useful entries to the CSS clipping set for
@media, @import and rule sets.
- all appropriate sets for the current language - additional sets appropriate for that language (e.g. HTML for Ruby in HTML or JSP) - possibly the active set (see below) - the universal set
This makes it much more likely that you’ll end up with a useful clipping in the completion set.
The active set is always included for “Insert Clipping”. It is only included in completion set if it is appropriate for the current language, or was a manual pick for the target document. (This avoids having PHP clippings appear in a Python file, for example, because you don’t have a Python clipping set and the PHP set was the last one used.)
Yeah, you heard that right.
If you have an existing browser list, you can as always add these applications to the list in the “HTML Preview” preferences, either manually or by using the “Find All” button.
#selectionorplaceholder placeholder_name#.
If the document has a selection when the clipping is inserted,
the placeholder will be replaced with the selected text. If
there is no selection, a placeholder named “placeholder_name”
will be inserted into the document.
This placeholder is particularly useful when building “dual-mode” clippings – that is clippings that are designed to be inserted via traditional means (the clippings palette, keybindings) or via the completion mechanism.
NUL, BEL,
etc. for characters below space (0x20).The existing .plist is still the preferred preference storage.
If a preference key does not exist in CFPreferences, we then look
in ~/.bbedit for a matching preference key.
Our two-stage namespace has been preserved, so if the old preference was was:
<key>StatusBar:SGIButton</key>
<true/>
then the .bbedit file would have this data:
[StatusBar]
SGIButton = 1
If neither preference system possesses a setting, the factory default is used.
For those who feel the need to, you can create a section in your
.bbedit file:
[PreferINIPrefs]
Which will cause BBEdit to ignore things set in the GUI, and prefer those settings.
If you do this, note that the UI does not, and will
never, track changes to the .bbedit file.
kBBEditSuite/kAESleepApplication.
Control over saving of existing documents is in place with an expert pref:
defaults write com.barebones.bbedit Misc:SaveTitledDocumentsBeforeSleeping -bool YES
If it’s set to YES, then any document that exists on disk
will be saved before sleeping. If set to NO (the default),
the document gets an autosave which will be restored when
the app comes up again. (Untitled unsaved documents are
always autosaved, irrespective of the preference setting.)
When BBEdit gets quit because of a system shutdown, restart, or user logout, it now does a “Sleep BBEdit” in order to restore as much of the application state as possible when starting back up. (This means that you may not be prompted to save new or unsaved documents, since they will be autosaved when the application sleeps.)
Passive FTP can be disabled per host, per domain, or globally:
FTP:AllowPassiveFTP:foobar.example.com - only for "foobar.example.com"
FTP:AllowPassiveFTP:example.com - only for servers in "example.com"
FTP:AllowPassiveFTP - global preference
Our recommendation is that you disable per host in preference to globally or per-domain, but at the end of the day, do whatever works. :-)
SSH compression can be disabled per host, per domain, or globally:
FTP:EnableSSHCompression:foobar.example.com - only for "foobar.example.com"
FTP:EnableSSHCompression:example.com - only for servers in "example.com"
FTP:EnableSSHCompression - global preference
Our recommendation is that you disable per host in preference to globally or per-domain.
(Note that ssh compression is on by default.)
The following expert prefs may be used:
Startup:AllowVolumeMount
# If set to NO, BBEdit will not attempt to mount a volume
# containing a document it wants to reopen. defaults to YES.
Startup:ReopenRemoteDocuments
# If set to NO, BBEdit will not attempt to open any
# documents that were opened from FTP/SFTP servers. Defaults
# to YES.
Startup:PromptToReopenRemoteDocuments
# If set to NO, BBEdit will open remote documents without
# asking, if Startup:ReopenRemoteDocuments is set to YES. If
# set to YES, BBEdit will prompt to give you the opportunity
# to skip remote documents. Has no effect if
# Startup:ReopenRemoteDocuments is set to NO. Defaults to YES.
bbdiff command-line tool now supports an additional
command form:
bbdiff [options] file /path/to/some/folder
If /path/to/some/folder/file exists, then file will be
compared against /path/to/some/folder/file. Otherwise, an
error is reported.
bbedit --maketags [optional list of dirs]
This can be used as an express way to invoke exuberant ctags, as follows:
# generate tags for the directory rooted at CWD
# and write the "tags" file in CWD
bbedit --maketags
# generate tags for each of the supplied directory trees, and
# create a "tags" file at the top of each directory tree
bbedit --maketags /path/to/some/directory /path/to/some/other/directory
<key>BBLMReferenceSearchURLTemplate</key> <string>http://www.example.com/foobar.cgi?SYMBOLNAME</string>
+75” will move to line
175; “-75” will go to line 25. An unsigned number will move to
the specified line number, as before.If a project or disk browser is the front window, then this command’s name reflects the name of the project, or the name of the directory that you’re currently browsing in the disk browser.
Choosing this command will open the Multi-File Search window with the project (or disk browser’s current directory) selected as the source for the multi-file search. Make any desired adjustments to the search settings and then start the search (or just hit Return/Enter and you’re off and running).
If the Multi-File Search window is in front, the command will target the frontmost (Z-order) project or disk browser, whichever occurs first.
The same command is available on the action (‘gear’) menu in projects and disk browsers as well.
If the language module has
<key>BBLMCanResolveIncludeFiles</key> <true />
in its plist, then BBEdit will send
kBBLMResolveIncludeFileMessage for every include chosen off
the includes menu. The param block will include a
CFStringRef with the name, a CFURLRef to the document on
disk (which may be NULL) and a place for you to put a
CFURLRef when returning.
If the module returns NULL and noErr, then BBEdit will
assume that the module declined to do anything with the
string and will look for the file as usual.
If the module returns a non-NULL URL, BBEdit will resolve
it, so the module can make a file://, http://, FTP or SFTP
URL and the right thing will happen. If the module returns
something other than noErr, BBEdit will not attempt anything
else with the include and will report the error.
window.alert
window.confirm
window.prompt
window.onbeforeunload
JavaScript user interaction is disabled during auto-reloads that BBEdit performs as you type or save your documents.
window.onbeforeunload is not triggered for an auto-reloads, or on window
close.
Additionally, the “Choose” button for <input type=”file”> elements is now functional.
.tar, .tar.gz, .tgz
files). When an eligible file is in the listing, it will
have a disclosure triangle next to it. Twist it open to
reveal the files and directories within. As with other items
displayed in disk browser listings, you can view files in
the editor view, or double-click them to open in a separate
window for editing.#define keyFallbackEncoding 'RdFB' // typeLongInteger, same semantics as keyReadEncodingValue
+x mode).
Unix executables continue to work as they have in the past.
If the chosen ‘filter’ is not an executable, but has a #! line, is it
automatically run for you.
All other ‘filters’ log a reasonable error.
tell application "BBEdit"
tell project document 1
-- add a file or folder:
make new project item with properties {file:POSIX file "/Users/siegel/p4/trunk/BBEdit/dox/"}
-- add a URL (with optional name):
make new project item with properties {URL:"ftp://foo.example.com/", name:"Mumble"}
-- add a collection (name required):
make new project collection with properties {name:"fumble"}
end tell
end tell
NSStringPboardType copy of the data
with LF line endings. This provides smoother interoperability
with Cocoa applications which are not line ending agnostic. (Or
more specifically, do not convert the pasteboard data to their
native internal representation, often resulting in a mixed line
ending document.)
N.B. BBEdit has always been line ending agnostic when reading data from the pasteboard.
If you want the backups to live somewhere else, lay down a folder alias named “BBEdit Backups” in ~/Documents/ and BBEdit will follow the alias.
foo.html~” is the backup
of “foo.html”.
If you want the backup to have the same file name
extension as the original, turn on the “Preserve file
name extension” in the Text Files prefs. This will cause
BBEdit to place the tilde after the “base” name of the
file: “foo~.html”.
php*” will now match any file whose filename
extension begins with “php” and ends with anything, rather than
attempting to apply the wildcard against the entire file name.Anything that BBEdit can usefully open into a document window will be enabled for selection. (This is equivalent to the “All Readable Files” setting in previous versions.)
Only files that are quickly recognizable as text files (without inspecting their contents) will be enabled for selection. (This is equivalent to the “Text Files” setting in previous versions.)
Enables all files for selection, regardless of type. (This is equivalent to the “All Files” setting in previous versions.)
Text Files Only Invisible Items
“Text Files Only” will limit the display to items which pass the text-file test (without examining their content). “Invisible Items”, if turned off, will limit the display to items which would be visible in the Finder (and also filters out CVS, Subversion, and package directories).
This organization allows a project to be checked in to source control, and each user can have their own settings and remembered state without affecting the project data itself, which used to require unnecessary commits.
Project documents in the new format have the filename
extension “bbprojectd”. File group and project documents
created by previous versions of BBEdit will be upgraded
(with a backup first), as before.
~/Library/Preferences/com.barebones.bbedit.PreferenceData/
are no longer used and may be deleted.
The “Open Recent” menu now shows all recently opened documents, grouped by document type, and sorted by name within each group. Folders are now included, so you can open a disk browser on a recently used folder by choosing it from this menu (something which was not possible before). Text and project documents are grouped before other types. The first grouping in the menu consists of the six most recently used items (of all types), sorted in descending order (most recently used first), for quick access.
The “Clear Menu” item at the end of the menu has been changed to “Clear History”, to more accurately reflect its function: if you choose it, all recent items will be cleared. Note that since recent folders are available as sources for multi-file search/replace and Text Factory operation, clearing the history will remove the folders from those operations as well.
The application preference controlling how many recent items BBEdit will remember applies to each type of item. So, if it’s set to 15, BBEdit will remember 15 text documents, 15 folders, 15 projects, 15 images, 15 movies, and so on. If you want finer control, you can construct an expert pref using the name of the document type as it appears in the menu (and if that name contains spaces, you’ll need to quote it). So, for example, if you only wanted to remember the five most recent projects:
# remember only the five most recent projects
defaults write com.barebones.bbedit NSRecentDocumentsLimit:Projects -int 5
Or the ten most recent folders:
# remember only the ten most recent folders
defaults write com.barebones.bbedit NSRecentDocumentsLimit:Folders -int 10
Or only the most recent shell worksheet:
# remember only the most recent worksheet
defaults write com.barebones.bbedit "NSRecentDocumentsLimit:Shell Worksheets" -int 1
If you don’t want to remember any recent documents of a particular type (they won’t appear in the menu, either), you can set its limit to zero:
# don't remember any images or movies
defaults write com.barebones.bbedit NSRecentDocumentsLimit:Images -int 0
defaults write com.barebones.bbedit NSRecentDocumentsLimit:Movies -int 0
Note that when setting the recent items limit, you MUST set
it as an integer, using “-int <some number>”.
#! script is now True. The state can be changed
from the “Run…” or “Run File…” dialogs and the change
will be persistent.Today you can override this for svn, p4 and cvs with the
expert preference. This change should make use of the expert
pref unnecessary in most cases.