TextWrangler 2.2 Release Notes

This page documents all feature enhancements and bug fixes included in the TextWrangler 2.2 update.

For details on changes made in previous versions, please see the release notes archive.

For complete information on TextWrangler’s features, please refer to the included PDF user manual, which you can access by choosing “User Manual” from the Help menu.


TextWrangler 2.2 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.


Note that the default position is saved separately for different types of windows: for example, file groups’ default window position is distinct from editing windows’. Also, the preference is keyed by your screen configuration, so if you frequently switch screen layouts (as when connecting an external display to a PowerBook), you can save distinct defaults which are applied for different screen configurations.

The URL templates are customizable in the Languages preferences; click the “Options” button to edit the URL template (along with other language-specific settings, such as the comment delimiters). Note that the URL can be any well-formed URL of any scheme supported by the OS or installed applications. (Witness the above x-man-page:// usage.) The string “SYMBOLNAME” (without the quotes) is replaced where it occurs in the template.

-*- x-counterpart: ExampleStrings.R; -*-, typing Control-Tab would look for the file “ExampleStrings.R”.

Note that this use of Control-left-arrow and Control-right-arrow replaces the old behavior of using these key combinations to scroll horizontally. If you prefer the old behavior, you can do the following from the command line:

@defaults write com.barebones.textwrangler Editor:ControlArrowCamelCase -bool FALSE

defaults write com.barebones.textwrangler Editor:ControlArrowHScroll -bool TRUE@

This is useful when you don’t have direct control over the order of the arguments passed (such as when using twdiff as a svn diff helper) but would like the argument reversed before being passed to TextWrangler.)

  1. p. Truly “anonymous” function detecting is optional, and can be controlled by the “Show Anonymous Functions” setting in the JavaScript language options (Languages preferences);

var foo = function() { … }; foo.bar = function() { … }; var bar = { bat: function() { … } };p. In the above examples, foo(), bar() and bat() would all be listed in the function popup.

function a() { var b = function() { … } b(); }

This behavior can be controlled by

defaults write com.barebones.textwrangler Filing:WriteExtendedAttributes<value>

value should be one of Always, Never, or Smart. Smart is the default.

If you wish to place a “marker” in the function menu, you can write a comment of the following form:

%: this is a mark

This comment syntax matches that used by TeXShop.

The new TeX module also includes some support for ConTeXt, in the form of special-case support for the “mode” environment (we ignore the contents of the mode environment, because it often contains out-of-order environment start/stop commands which can confuse the parser).


defaults write com.barebones.textwrangler Services:TranslucentDrags -bool NO

Change “NO” to “YES” to enable translucency in drags.

If desired, these settings can be changed from the command line:

@defaults write com.barebones.textwrangler Services:QuickTimeImages -bool NO

defaults write com.barebones.textwrangler Services:QuickTimeMovies -bool NO
defaults write com.barebones.textwrangler Services:DontTranslatePDFs -bool YES@

Change “NO” to “YES” to turn the option on (vs. off).

@defaults write com.barebones.textwrangler BrowserWindows:ShowIcons -bool NO

defaults write com.barebones.textwrangler BrowserWindows:HierarchicalResults -bool NO
defaults write com.barebones.textwrangler BrowserWindows:NodesExpanded -bool NO@

defaults write com.barebones.textwrangler DifferencesResults:ShowIcons -bool NO

There is a new “Text Display” submenu. This menu contains the following commands:

“Mac (CR)”
“Unix (LF)”
“Windows (CRLF)”

This affects the prefs window and Text Factory “Change Line Endings” settings dialog.

If you wish to override this, you may do so from the command line with a “defaults write” command to change the “Services:ScriptEditorBundleID” preference; for example, to set the script editor to Script Debugger:

defaults write com.barebones.textwrangler Services:ScriptEditorBundleID com.latenightsw.ScriptDebugger defaults write com.barebones.textwrangler Filing:WarnMalformedUTF8 -bool YES

If you want to adjust the Hide Palettes or Keep Windows Arranged options, you can do so thusly:

@defaults write com.barebones.textwrangler DifferencesResults:HidePalettes -bool TRUE

defaults write com.barebones.textwrangler DifferencesResults:KeepWindowsArranged -bool TRUE@

defaults write com.barebones.textwrangler Misc:CVSDirsAreInvisible -bool NO defaults write com.barebones.textwrangler Windows:ZoomInPlace -bool NO defaults write com.barebones.textwrangler "#!ScriptTask:WarnAboutNonUnixLineBreaksBeforeRunning" -bool NO defaults write com.barebones.textwrangler "#!RunScriptPrefs:UseAffrusForPerlDebugging" -bool NO defaults write com.barebones.textwrangler Spelling:UseExcalibur -bool YES

There’s a new preference that can be used to bypass the default encoding:

defaults write com.barebones.textwrangler Filing:Filing:AskForUnguessableFileEncoding -bool YES

If this preference is set, then the application will ignore the preference and always drop the sheet asking you to choose an encoding.

NB: this will break any third-party CFM-based LMs that expect to receive kBBLMMatchKeywordMessage, because they no longer will. I don’t think that any such exist in nature, however.

Navigation Bar → Open Files Menu (Ctrl-Opt-F) Navigation Bar → Open Function Menu (Ctrl-Opt-N) Navigation Bar → Open Includes Menu (Ctrl-Opt-F) Navigation Bar → Open Marker Menu (Ctrl-Opt-M)

If you preferred the old behavior, there is a preference to restore it:

defaults write com.barebones.textwrangler FTP:ConfirmServerChangesFromBookmark -bool YES