As with most text editors, TextWrangler provides many options that allow you to customize the editing interface. Two settings I sometimes change are accessible only as preference options or as toolbar menu items. As I would prefer to toggle these features with a single keystroke, I wrote a pair of scripts to do the job. Two associated keyboard shortcuts later, there’s no need to display the toolbar or visit the preferences.
Toggle Line Numbers
This script toggles the show line numbers property of the frontmost text window.

Toggle Soft Wrap
This script toggles the soft wrap text property of the frontmost text window.

Download
- Toggle Line Numbers 1.3 KB
- Toggle Soft Wrap 1.3 KB
The color scheme seen in the screenshots is Gruber Dark.
Installation
Unzip the scripts and put them in ~/Library/Application Support/TextWrangler/Scripts. Keyboard shortcuts can be assigned with the Set Key button in the Scripts palette, found under Palettes in the Window menu.
Posted on Monday, April 28, 2008 at 12:36 PM