BBEdit 12 Release Notes
BBEdit 12 contains many new features, enhancements, and refinements to existing features. It also includes fixes for reported issues. This document describes changes in BBEdit since the previous update (11.6.8). An extensive archive is available here.
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 12 requires macOS 10.11.6 ("El Capitan") or later, and is compatible with macOS 10.13 "High Sierra".
Beginning with this version, you can open documents that are much larger than was previously possible. In the Before Time, documents whose in-memory size (about twice the on-disk size) exceeded roughly 1.5GB would fail to open and report an out-of-memory error, as would documents whose internal structure required generation of large quantities of syntax coloring and/or code folding information (such as complicated XML documents).
Beginning with this version, you can perform many large-scale operations on very large files without running out of memory or needing to clear Undo state.
BBEdit is now built as a 64-bit application. This works around various reported bugs in the OS and has other beneficial side effects: the application starts more quickly on a "cold" launch; 64-bit color pickers and contextual-menu plug-ins are now available; and our customers are even more attractive and athletic than before.
Support for the Touch Bar has been added to various windows (applicable only to computers that have a Touch Bar, of course):
FTP/SFTP browser windows: "go up", "go down" (into selected folder), and "reload".
Text Factory windows: add/remove actions and run the factory.
"Preview in BBEdit" windows: for items in the tool bar.
Editing windows: toggle the sidebar and previous/next document navigation.
"Go To Line" (either the menu command or the popover from the cursor position display) supports the specification of line ranges, in addition to just a single line and column. For example, entering one of these forms into the field will behave as follows:
X | moves the insertion point to the beginning of line X |
X:C | moves the insertion point to column C of line X |
X-Y | selects the text from the beginning of line X to the end of line Y (including the line break at the end of the line). |
X:C-Y | selects the text from column C on line X to the end of line Y (including the line break at the end of the line). |
X:C-Y:C2 | selects the text from column C on line X to column C2 on line Y . |
In this way, you can use "Go to Line" to select ranges of text based on line and column number.
"Preview in BBEdit" windows get a new item in their tool bar: "Open in Browser", which will preview the document's contents in the most recently used preview browser (or your system's default web browser, if applicable).
For language module developers: modules can now generate a new run kind (or use it as
an available color for keywords):
com.barebones.bblm.syntax-error
. This is for use as its name
suggests, in the case where the color scanner detects something
incorrect while examining the document. The color preferences and
built-in color schemes have been updated to include this.
There's a new preference pane: "Completion". This contains the settings for text completion that used to be in the Editing preferences, and adds a setting for automatic insertion of delimiters (parens, brackets, single and double quotes, as well as any language-specific elements).
The setting "Surround selected text when typing matching delimiters" allows you to control whether typing an opening delimiter will surround the selection range. This is independent from whether delimiters are auto-paired when typing an opening delimiter with no text selected.
There is a new command on the Edit menu: "Paste Using Filter". Under this item are text filters from your "Text Filters" application support folder. Choosing a filter will process the text on the Clipboard through the selected filter before inserting it in your document.
You can paste using the most recently used filter using the appropriate command on the "Paste" submenu of the Edit menu. This latter command can also have a keyboard equivalent for quicker access.
When performing an Extract operation, you can now use a Grep replacement pattern in the "Replace" field (in Find or Multi-File Search) to transform the extraction results. Consider this example text:
!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
!_TAG_PROGRAM_AUTHOR Universal Ctags Team //
!_TAG_PROGRAM_NAME Universal Ctags /Derived from Exuberant Ctags/
!_TAG_PROGRAM_URL https://ctags.io/ /official site/
!_TAG_PROGRAM_VERSION 0.0.0 /a1e9cbe/
To extract just the unique part of each field name (without the
leading !_TAG_
), match it with this pattern: _TAG_(.+?)\s
. The
first capture group is the unique part of the field name, so use
\1
in the "Replace:" field, and then click the "Extract" button.
The resulting extracted text will be:
FILE_FORMAT
FILE_SORTED
PROGRAM_AUTHOR
PROGRAM_NAME
PROGRAM_URL
PROGRAM_VERSION
Performing extraction with Grep substitutions will allow many extraction operations to be completed in just a single step, rather than requiring more than one Replace All operation.
The Printing preferences get a new setting to control whether documents should always be wrapped to the printed page.
There's a new submenu on the Edit menu, "Columns". This submenu contains commands to help you work more easily with column-delimited text files.
The three basic commands, "Cut Columns", "Copy Columns", and "Clear Columns" work similarly to their top-level analogues.
The columns to be cut/copy/cleared are determined by the selection range: to cut a single column, for example, click in the middle of it. You can cut/copy/clear multiple columns by selecting text across them.
The "Rearrange Columns" command gives you an easy way to, well, rearrange the columns in a column-delimited text document. Choose the menu command, and then drag the items into the list to order them as you would like, then press the "Apply" button.
There is a new section in the Setup window: "Folders". This section lists the available folders in the BBEdit application support folder. Double-clicking on a folder, or clicking the arrow next to a folder, will select that folder in the Finder (creating it first, if necessary).
This addition makes it easier to get at application support folders
in general, since the Library
folder is hidden by default from the
user.
There is a new setting in the Keyboard preferences:
"Enable macOS “Help” key". This is off by default, so that
pressing the "Insert
" key which is present on some PC-style
keyboards doesn't open the in-application help. (This frequently
happens accidentally.)
Added an "Expert" preferences pane, which provides direction to the Expert Preferences help book. The "Restore Defaults" button in this pane will reset all expert preferences to their factory defaults.
There's a new command on the Text menu: "Canonize". This command is useful for doing batch search-and-replace operations in a file, using another file as a list of search-and-replace transformations.
The transformation file is itself a list of replacements, one per
line. The search string is separated from the replace string by a
tab, so if you want your searches or replacements to contain tabs,
you use the "\t
" escape sequence. Blank lines are allowed.
Transformation files may be commented: everything after a "#
" is
ignored, so if you want to use search or replace strings that
contain a "#
", you must escape it: "\#
".
There is one case in which a line may contain only a single string, and that is when you wish to case-insensitively normalize the spelling of all occurrences of a word.
Here's an example file:
void VOID
MyAncientClassName MyModernClassName # class rename for the new world order
# this line is a comment
\#include \#import # convert from C++ to Objective-C
noErr # normalize capitalization from "noerr", "NOERR", "NoErr", etc
When using the Canonize command, you can specify whether the searching is to be case-sensitive or not; and whether the searches should match on word boundaries, or not. (These behave identically to the "Case Sensitive" and "Match Words" options in BBEdit's "Find" window.)
Note that even when you have specified "Case Sensitive", a single word on a line by itself will perform a case-insensitive search, since its function is to normalize all occurrences of the word to the same capitalization.
The Live Search command now supports grep pattern matching when the "Grep" option is enabled, and stored patterns are available under the "Saved patterns" ("g") popup. If the entered pattern is invalid, BBEdit will display an alert icon which you can click to see the error.
When a remote (FTP/SFTP) document is open, "Reload from Disk" on the File menu will become "Reload from Server"; choosing this command will fetch a fresh copy of the document data from the server, and then refresh the document's contents.
"Preview in BBEdit" windows get a "Show Inspector" toolbar button, which displays the WebKit inspector pane for code introspection.
The --new-window
option for the bbedit
tool can now be
applied when opening directories: it will stop the application
from checking to see whether you've already opened that
directory, and thus allow you to open the same directory in
multiple windows.
The navigation bar now contains an item indicating the current Git branch (for documents that are in a Git working copy).
Split View (on OS X 10.11 and later) is now functional.
Dragging items from an FTP/SFTP browser to the trash is now equivalent to selecting them and clicking the "Delete" button.
You can now drag local files and folders onto an FTP/SFTP browser window to upload them.
"Consolas for BBEdit" is no longer the factory default font setting, nor is the font included in the application package. If you have installed Microsoft Consolas by other means (it is available from Monotype), BBEdit will use it as the default font; otherwise it will default to an appropriate choice. (Menlo is the choice of last resort.)
Items in the function menu are now badged according to their type.
Removed the "Unicode" option for the Change Line Endings text factory action.
Unboxed the settings in the "Text Files" preferences.
There are enough "Paste" items that there is now a submenu for them, and "Paste & Match Indentation" and "Paste Column" have been moved there.
"Sort Lines" normally collates lines using Unicode collation order, which is fine as long as you don't expect case sensitivity to take precedence and return meaningful results. If you would prefer to sort lines using strict character code order, you may do so by turning on "Case sensitive" and turning off "Numbers match by value".
When locating Unix tools for various purposes, BBEdit will
now honor your PATH
environment variable, if it is available
and not empty. This should result in more predictable outcomes
when using aftermarket installations of open-source tools as well
as for alternative installations of tools included with the
system (such as Python).
Note that if your PATH
contains entries relative to the current
working directory, those entries are not likely to work, since
$PWD
has underfined meaning for a GUI application. Absolute paths
will work, though. If you change your PATH
, you will need to quit
and relaunch BBEdit for the changes to take effect.
The "Save [a Copy] to FTP/SFTP Server" panel has been rewritten. For bonus points it now runs window-modal instead of application-modal.
The FTP/SFTP browser window has been rewritten. There are some slight layout changes, but the chief improvement is that folders can now be twisted open to reveal their contents.
Differences windows, live preview windows, and FTP browser windows now use the system-provided "refresh" icon image, rather than the old circular green arrow.
Added explicit built-in languages for Tab-Separated Values
and Comma-Separated Values. Their default extension mappings are
(respectively) .tsv
and .csv
.
When using a dark color scheme, the various window adornments are adjusted so that they blend better with the editing view. This also affects windows which are not necessarily editing windows.
When starting the application up with no existing preference settings (and none were migrated from TextWrangler), BBEdit will now set the "BBEdit Dark" color scheme as the factory default. If you prefer a different scheme, you can choose it in the "Text Colors" preferences.
Operations in Text Factory windows now include a check box for turning the operation on and off.
Comparisons done by means other than through the Find Differences dialog will use the last settings specified in the dialog, rather than falling back to factory defaults. This includes the "Compare" contextual menu item, "Compare Against Previous Version", "Compare Against Disk File", and various forms of SCM revision comparison.
When performing an Undo or Redo and the selection
range has been changed, the undo/redo operation will select the
text that was affected, rather than updating the Undo/Redo state
to include the actual current selection range. If you preferred
the old behavior (as implemented from the beginning of time up
through BBEdit 11.6), it is available by setting the expert
preference LegacyUndoSelectionBehavior
to YES
.
The legacy preference data location of
~/Library/Preferences/com.barebones.bbedit.PreferenceData/
is
no longer supported. If you are upgrading from an ancient version
of BBEdit, you can copy and rename this folder to
~/Library/BBEdit/
.
Use a star instead of an up-arrow to indicate menu command items that are available after the evaluation period only with a paid license.
If a Dropbox configuration file is available, BBEdit will try to use it to locate your Dropbox folder (for application support items).
Changed the factory default setting for
Editor_SoftWrapLengthThreshold
to 48MB (up from 5MB).
Plug-in language modules now have an opportunity to influence
auto-pair generation while typing. This is done with the
kBBLMAutoPairMessage
, which modules can implement by examining
the parameters in the fAutoPairParams
member of the parameter
block.
The "Go to Named Symbol" sheet now uses the font of the editing view as its list display font.
Made some improvements to the resolution logic when choosing items off the Includes menu for C-family languages:
If /usr/include
doesn't exist, BBEdit will now look inside
usr/include
relative to the newest available Xcode SDK (if
Xcode is installed).
Additional effort is made to resolve file-relative references to included files.
The Emacs mode line parser no longer generates nor pays attention to properties that can no longer be set on a per-document basis (such as status/navigation bar visibility and other aspects of the window chrome).
In cases where a language module does not generate its own number coloring, BBEdit will now color decimal (integer) numbers using the appropriate color from the active color scheme.
The line number bar in editing views will now always use the
editor font. The UseEditorFontForLineBar
expert preference is
no longer supported. The maximum size used is limited in order to
work around layout issues which arise when trying to resize the
editor font for use in the space allowed.
During multi-file search/replace operations, the "Searching" progress name will reflect the name of the folder being scanned, unless a file is actually being searched. This improves progress feedback when searching very large folders with relatively few candidate files (as when using a file filter).
Made a change so that the line number text is never drawn in a text size larger than the editing view's display font.
Adjusted the weight and spacing of the font used for drawing the line number bar.
Updated the internal PCRE support to version 8.41.
Improved the presentation of Xcode projects and saved Spotlight searches (Finder smart folders) in the Multi-File Search window by removing their filename extensions.
The C/C++/Objective-C/ObjC++ function scanner now generates additional information for the function menu.
The built-in Markdown language module now uses cmark
to
convert Markdown to HTML. This improves support for previewing
and exporting Markdown code which goes beyond the original
Markdown specification and behavior.
cmark
is included under the terms of the 2-clause BSD
license, as follows:
Copyright (c) 2014, John MacFarlane
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above
copyright notice, this list of conditions and the following
disclaimer in the documentation and/or other materials provided
with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Made changes to the HTML/XML function scanner so that it generates a prettier function menu.
The "Go to Named Symbol" panel will display badges consistent with what the function menu shows, where possible.
Added keyboard equivalent defaults for Jump Points/Next and Jump Points/Previous.
The alert for "Clear Undo State" is now window-modal instead of application-modal.
Fixed bug in which the color used for highlighting selected items in lists wouldn't always track changes to the highlight color setting in the General system preferences.
Fixed bug in which changing the "Document navigation" setting in the Appearance preferences didn't take effect until you created a new window or restarted the application.
Made a change to our persistent-file-reference mechanics so that project documents and their associated files may be duplicated and relocated more readily.
Fixed a bug in which key equivalents in Cocoa modal dialogs did not get a chance to operate when they overlapped with the keyboard equivalents for enabled menu commands.
Fixed bug in which saving a non-HTML/XML document which contained an HTML character set declaration would inappropriately warn in cases where the declaration didn't match the document's current encoding.
All of the application's modal dialog boxes have been rewritten to modernize their internals and eliminate legacy API usage.
When using "Copy as Styled {Text,HTML}", the background color is only specified if it is a "dark" color.
Updated the "Read Me.txt
" file that is written into
Application Support/BBEdit
, and fixed a bug which prevented it
from automatically being updated when necessary.
Custom Keywords
and Packages
folders are now created by
default when setting up a new Application Support/BBEdit
folder.
Fixed a bug in which the C/etc function scanner was
confused by the presence of __attribute__
directives appearing
before the function name.
Fixed a rare crash in the HTML function scanner which would occur on certain very short (3 characters or less) documents.
Made a change to the HTML/XML function scanner so that it abandons function generation when it looks as though it's generating runaway results (which can happen in very large automatically generated files which have an ID on practically everything).
The "Save" item on the Grep Patterns menu (used in the Find and Multi-File Search windows) is now disabled if the "Search For" field is empty.
Made changes so that some windows and modal dialogs show focus rings for controls in situations where they didn't previously. This improves the experience of using "Full Keyboard Navigation".
Entity conversion in "Convert Text to HTML" now works correctly with UTF-16 surrogate pairs (such as emoji).
The entity-to-text conversion done by "Translate HTML to Text" now generates the correct output with entity values outside of 16-bit range.
Made a change to improve performance when using "Ignore" or "Learn" (spelling), in documents with a very large number of highlighted spelling errors. (The same fix also addresses incorrect updating of the highlighted ranges when repeating a spell check after having learned or ignored words.)
The "Text File" language now "supports" text completion, which means that dictionary words, clippings, and words in the file are now available for such files.
Made a change so that dragging a package (bundle, application, etc) on to BBEdit will open an instaproject, just as with dragging a folder.
The TeX language module now allows completions from the system dictionary in more situations than it did before.
Fixed bug in which a -50 error would occur when comparing untitled documents whose names contained certain URL-unsafe characters (such as might occur when generating output from a Grep extraction).
The Open File by Name window now ignores relative-path
specifiers ("./
" and "../
") that occur at the beginning of
the search string, which increases the chances of a successful
search.
Fixed bug in which the Zip archive reader would leak memory, which posed a problem when processing a large quantity of Zip archives (during multi-file search or text factory application).
The "Clear History" command on the Open Recent menu will now ask the OS to clear its own history as well, which should in turn remove recent items from the application's Dock menu.
Made a change to improve performance when loading UTF-8 files.
Text views now respond to "pinch-to-zoom" in order to change magnification. This can be controlled using the "Allow pinch-to-zoom to change magnification" setting in the Editing preferences.
The "Go To Line" popover (which appears when you click on the cursor position display) is now an actual system popover, so it looks and behaves much better than before.
Fixed a small memory leak.
The Text Options and File Info panels are now implemented using system popovers, for improved behavior and appearance.
The Edit Markup panel has been rewritten as a system popover. Appearance and behavior are improved overall.
Fixed selection flashing which would occur when doing a multi-file Replace All or text factory operation that affected open documents.
The "Open File by Name" window no longer reopens itself at application startup, which in some cases will improve startup time a bit if the window was left open the last time the application was quit.
Made a change so that preview helper discovery no longer happens on the main thread, which should improve application startup time in cases where such discovery might take a long time.
Fixed a bug in which the sidebar in disk browsers didn't highlight correctly to indicate the ability to receive a dragged file.
The source picker sheet (used by the "Choose" button in text factory windows) once again allows you to drop files and folders onto it to add them.
Reworked the on-disk storage of "Saved Search Sets" as created by the "Save Set" button in the Multi-File Search window. The backing data file is now stored in the "Setup" subfolder of the BBEdit application support folder, so that it can be shared using Dropbox or iCloud Drive.
Improved the behavior of Saved Search Sets in the Multi-File Search window: when you select one, its selection is remembered across invocations of the window, rather than being "exploded" into its component items.
Fixed bug in which changes in an untitled document's text were not immediately reflected in the document's entry on the Window menu.
Made a change so that the lines for tab stops (when "Show Tab Stops" is turned on) are drawn more efficiently when circumstances allow.
Fixed bug in which using the Escape key to dismiss the Find or Multi-File Search windows didn't work when the CAPS LOCK KEY WAS DOWN AND "EMULATE EMACS KEY BINDINGS" WAS TURNED ON IN THE KEYBOARD PREFERENCES.
Made a change to reduce the transient memory requirement for
building the Open File By Name directory cache from a truly huge
data source (such as $HOME
). This will help reduce the
incidence of crashes resulting from running out of address space
while building the cache.
Fixed bug in which Search Results windows didn't show up as eligible sources in the Multi-File Search window.
Fixed crash which would occur when closing a Differences window while it was in the middle of computing and preparing the selected difference for display.
The redundant "Save" button has been removed from the Text Factory window.
Fixed a crash which would occur on 10.11 when certain windows were left open at the time the application was quit.
Fixed proximate cause of a crash while updating the Shell Worksheet status bar item.
Keyboard focus is now on the name field when creating an item in the FTP/SFTP browser window.
Fixed a performance problem which would appear when drawing lots of tab stops in an editing view, which in turn typically occurred when the tab stops were very narrow and/or the editing view was extremely wide.
Made some fixes to the progress-dialog mechanics, so that
starting a progress operation in the background (such as from a
script or terminal command) no longer starts a chain of events
that ends up making the Dock and application switcher
unresponsive (Radar 33462091
).
Made a change to the "Reveal in Finder" mechanics so that Pathfinder isn't used unconditionally just because it's running.
Made various improvements to how projects and multi-document windows keep track of files in the sidebar. Situations in which files are moved or deleted should generally be handled more gracefully than before.
Fixed crash which would occur when language modules
passed out-of-bounds values to bblmAddTokenToBuffer()
. This
callback will now return paramErr
to the module if asked to add
a token larger then 2K bytes.
Git "Check Out Branch" is now available for disk browsers and instaprojects if the directory you're viewing is a Git repository (or in one).
Fixed a bug in which knowledge of the selected document in a multi-document window wasn't saved correctly when quitting nor applied correctly when restoring state.
Fixed bug in which the insertion point and subsequent output in shell worksheets would not be scrolled into view when the command line being executed was on the very last visible line of the document.
Fixed bug in which application state (but not auto-save data) was lost when quitting with running multi-file search or text factory windows open. (The application will still require an extra Quit command in this case, but you won't lose open window state or positions.)
Fixed bug in which CSS margin and padding values were placed into the wrong dialog field in some situations, leading to inappropriate changes to the CSS.
Fixed bug in which internally generated readtags
output from
files containing non-MacRoman text (such as HTML files) would
appear strangely when the parsed output was used (such as in the
"Go To Named Symbol" panel).
Fixed bug in which the "Go to Named Symbol" panel would fail to display qualifying function entries in HTML (and potentially other) documents.
Fixed crash caused by missing resource for the Perforce "Show Revision History" panel.
Modernized the Dock progress bar implementation.
Increased the maximum height of the Windows palette so that it can be fully extended when on very tall displays (such as a 16x9 display stood on the short edge).
Improved the duplicate detection in the "Go to Named Symbol" panel so that items on the same line but with different names aren't considered duplicates.
Fixed bug in the C-family function scanner in which callout comments following function prototypes would be duplicated in some situations.
Added __SUB__
to the built-in Perl keyword list.
Fixed bug in Perl syntax coloring in which whitespace
between the =
and the name of a POD comment were interpreted as
a valid POD comment.
Modernized some code in the bbfind
tool.
Fixed the beep when opening an instaproject after having previously used "Save Default Project Window" with the editor view hidden.
Made a change to sort file names containing ctags definitions in a more reasonable order.
Status and navigation bar items now update as necessary when the system-wide language changes while the application is running.
Fixed bug in which Microsoft Visual C++ __declspec
qualifiers would confuse the function scanner.
Added __declspec
to the list of keywords for C and C++.
Fix hanging bug in YAML module when it found invalid syntax after a "|" block literal indicator, such as "|--"
Fixed bug in which git-ignore filtering in the Open File by Name window didn't work in cases where the data source was a BBEdit project that was not itself in a Git repository.
Fixed bug in which git-ignore file filtering in projects wouldn't work correctly when the project was not in the same git repository as the folders being processed (or wasn't in a git repo at all).
Fixed bug in which various parts of the UI which depended on folder listings (scripts/filters/clippings, counterparts, and such like) would list items out of order on APFS volumes and other non-HFS file systems (in which directory enumeration order was not necessary sorted by name).
Made a change so that any errors that occur while right-clicking on sidebar items in a project window are not reported. This allows actions such as right-clicking on a missing SFTP item to pop up the contextual menu (so that you can remove it) without an alert interfering.
Updated some of the document icon artwork for improved appearance on retina displays.
Removed retain
from the Objective-C/C++ keyword list.
Up/down arrow movement in the completion popover will now wrap around from end to beginning (for down arrow) or beginning to end (for up arrow).
Made a change to significantly improve performance when soft-wrapping long documents to the window width. (The benefit is only available when a fixed-width font is in use.)
Removed "Show" from the "Scratchpad" and "Unix Worksheet" commands on the Window menu, because those are not toggles, and will always bring the appropriate window to the front.
fin