Tag Archive: “textwrangler”

Processing Syntax Coloring in TextWrangler

Processing is based on Java. TextWrangler supports syntax highlighting for Java code, but it doesn’t automatically recognize that Processing uses Java syntax. So, head over to the Languages pane of TextWrangler’s preferences and click Add next to the Suffix Mappings list. Enter .pde as the Extension and select Java as the language that should be associated with .pde files.

Now if you open a Processing source code file in TextWrangler, it will be displayed with basic syntax highlighting.

Posted on Thursday, March 18th, 2010.

Using QuickCursor with TextWrangler

Via Michael Tsai’s blogQuickCursor is a new utility that let’s you use the text editor of your choice to edit text fields you encounter in any program. It supports BBEdit by default, but it’s not too hard to add support for BBEdit’s little brother TextWrangler. Here’s how:

Open QuickCursor.app/Contents/Frameworks/Info.plist with Property List Editor, display the QCEditInChoices array, and click Add Child. Enter com.barebones.textwrangler and save the file.

qctw
Now you can use TextWrangler almost anywhere.

qctwmenu

Of course, it’s not too hard to cut and paste text to and from another editor. This is most useful if you define a shortcut key to open the current text field in your favorite editor.

Posted on Monday, October 5th, 2009.

Toggling Line Numbers and Soft Wrap in TextWrangler

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.

Line Numbers Off Line Numbers On

Toggle Soft Wrap

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

Soft Wrap Off Soft Wrap On

Download

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 28th, 2008.