These macros generate various forms of formatted text.
Add_Prefix_and_Suffix.bsh
Abstract
Adds user-supplied “prefix” and “suffix” text to each line in a group of selected lines.
Text is added after leading whitespace and before trailing whitespace. A dialog window receives input and “remembers” past entries.
Color_Picker.bsh
Abstract
Displays a color picker and inserts the selected color in hexadecimal format, prefixed with a “#”.
Duplicate_Line.bsh
Abstract
Duplicates the line on which the caret lies immediately beneath it and moves the caret to the new line.
Insert_Date.bsh
Abstract
Inserts the current date and time in the current buffer.
The inserted text includes a representation of the time in the “Internet Time” format.
Insert_Tag.bsh
Abstract
Inserts a balanced pair of HTML/SGML/XML markup tags as supplied in a input dialog. The tags will surround any selected text.
Next_Char.bsh
Abstract
Finds next occurrence of character on current line.
The macro takes the next character typed after macro execution as the character being searched. That character is not displayed. If the character does not appear in the balance of the current line, no action occurs.
This macro illustrates the use of InputHandler.readNextChar() as a means of obtaining user input. See the section called “Using a Single Keypress as Input”.
Toggle_Line_Comment.bsh
Abstract
Toggles line comments, alternately inserting and deleting them at the beginning of each selected line. If there is no selection, the macro operates on the current line.
A “line comment” is a token that designates the entire contents of a line as commented text; it does not use or require a closing token. If the editing mode does not provide for line comments (for example, text or XML modes), the macro will display an error message.