Comment on TextExtras

The developer's page tells you everything you need to know, but as another interested party I'll repeat it here:


Goto Panel: This panel is accessible through the TextExtras menu. It allows you to find and select line ranges or character ranges by number in the active text object. It can also be set to track selection changes in the active text object and display the current selection as a character or line range. This auto-update feature does not work for field editors.

Nest/Unnest: These two new commands are accessible through the TextExtras menu. They will, respectively, increase or decrease the indent level of the lines in the selection of the active text object by one indent level. This feature uses the Tab Width and Indent Width preferences in its calculations.

Indent Wrapped Lines: (aka Scott-wrap) This feature must be turned on in the Preferences panel. This feature does not work with multi-layout or multi-view text objects. Itdoes not work with rich text objects, field editors, or non-editable text objects. When it is enabled, all wrapped lines indented specially. The Wrapped Line Indent Width preference determines how much extra indentation the wrapped lines have beyond the indentation of the original line.

Select to Matching Brace: This feature must be turned on in the Preferences panel. When it is enabled, double-clicking on a brace-like character will extend the selection to the well-balanced matching brace (if any). Brace-like characters include such as parenthesis, braces, and square brackets. If there is no matching brace (perhaps because of unbalanced pairs of internal braces), the single brace is left selected.

Show Matching Brace: This feature must be turned on in the Preferences panel. When it is enabled, typing a closing brace will cause its matching open brace to be momentarily highlighted. If there is no matching opening brace there is no momentary highlight. Unfortunately, the opening brace might also not be on screen to highlight. Because of the unobtrusiveness of this bundle, it was necessary to implement this feature in a slightly roundabout way, with one little side effect being that right-arrowing past a closing brace will also flash the opening counterpart.

Auto-indent: This feature isn't accesible unless you add a key binding for it. This feature does not work in field editors. When invoked this inserts and newline into the active text object followed by enough indentation to match the previous line. The selector to bind to for this feature is "insertNewlineAndIndent:" To find out how to add a binding for it, see the OPENSTEP release note on Text System Defaults and Bindings.

Simple Escape Completion: The TextExtras bundle implements the complete: method in a category on NSTextView. This will add escape-completion to any new text object that doesn't already have it (on Windows the default key binding for complete: is actually F2, not Escape, but this can be changed). It won't interfere with subclasses that already do completion in their own way or with text objects whose delegates provide escape completion. It will interfere with other NSTextView category implementations of complete:, but then overriding standard methods in a category is not a good idea generally (he says while describing his category override of a standard method). The completion provided by this feature is dirt-simple. It will complete only to the first found match. It looks backwards from the selection to the beginning of the document first, then forwards from the selection to the end, if necessary. If there are multiple possible matches, the first is used and there is no way to cycle through any others.