C.4. BBEdit
BBEdit is a popular commercial text editor for Apple computers, considered by many Mac developers to be the best available. You can read about its extensive features, download a demonstration copy of the application, or purchase a full license for the software from http://www.barebones.com/products/bbedit/.To configure BBEdit with the extra editor features suggested in this book, you might first need to create some local folders (in order to pre-empt the application's default support folder). See the application's user manual for more information.Then, adjust your preferences settings. In the Preferences > Editor Defaults screen:- Turn on Auto-Indent.
- Turn on Balance While Typing.
- Turn on Auto-Expand Tabs.
- Turn on Show Invisibles.
Adjust your tab stops to four spaces. For BBEdit 7, use the configuration panel under Text
The Glossary will now contain a debug item whenever a Perl file is opened. Selecting that item will wrap the specified text around the current selection, which will be inserted in place of the #SELECT# marker. The insertion point will then be placed wherever the #INSERTION# marker was, and the marker will be removed.You can create as many glossary entries as you wish. For example, a ~/Library/Application Support/BBEdit Support/Glossary/Perl.pl/benchmark file might contain:
use Data::Dumper qw( Dumper );
warn Dumper [ #SELECT##INSERTION# ];
use Benchmark qw( cmpthese );
cmpthese -10, {
#INSERTION#
};