UltraEdit includes several special insert functions under the Insert menu. You can use these functions to insert a file into the current file, insert a string into the file at every specified increment, sample colors from anywhere on your screen, and more…
The Date/Time command inserts the date and time in the active file at the position of the cursor. The format of the date and time are determined by the regional settings defined for the operating system. If you wish to customize the date/time, you may prefer to use the templates (which are discussed further below).
The insert line command inserts a new blank line below the current cursor position. When invoking this command, You may position the cursor anywhere on the active line.
A page break is for printing purposes, it causes printing to stop at the page break and continue printing on the next page.
The page break shows as a solid line through the editor display.
The page break character can be configured in the Page Setup dialog.
Use the File command to insert an existing file into the active document. The complete contents of the selected file are inserted in the active document at the cursor position.
String at Every Increment
The Insert String At Every Increment feature allows you to insert a specified string at a constant increment in the file from a designated start point to a designated end point.
Selecting this function will invoke a dialog with some further options for the string insertion.
1. Type String to Insert
In the “Type String to Insert” text field, you will specify the exact string or character you’d like to insert at every specified increment. You may use special characters in this field; for example, use “^p” to insert a new line at every specified increment More information about special characters is available in the help file.
2. File Increment (Record Length) at which to Insert String
You will enter in this text field the length at which you’d like to enter the string. For example, if you have database records that are not separated by a new line, and each record is exactly 40 characters long, you would enter “40” here to insert a line break and new line after each individual record.
3. File Offset Start Point
This option allows you to set whether UltraEdit will begin counting the file increment (record length) from the start of the file, or from the current cursor position. For example, if you select “Start Count at Cursor Position,” and your cursor is currently at column position 5, the string would be inserted at position 45 instead of 40.
4. Stop Insert
This setting allows you to specify where the string insertion should be terminated. By default, the string insertion will continue to the end of the file.
Selecting “At file offset” will require you to specify an absolute string position in the file where the string insertion will terminate. For example, if you set this to “80” (continuing with our above example of 40 as the increment), UltraEdit will insert the string only two times–once at position 40 and once at position 80 in your file.
Selecting “After specified number of records replaced” will require you to specify a number of records in the corresponding dialog where the insertion will stop. This ending point will cause UltraEdit to terminate the string insertion at this number of records, based on your setting in the “File Increment” field. For example, if you set this to “4” and your File Increment is “40”, UltraEdit will insert the string four times–once after the ending character of each 40-character record.
Note: This is not a concrete line number or character/column number, but a number of records after which to terminate the insertion string.
Selecting “When specified string is encountered” will require you to specify a string (any character(s)) where UltraEdit will terminate the insertion once the string is encountered. For instance, if you set this to “$”, UltraEdit will stop inserting your string as soon as it encounters the first “$” in your records.
The Literal Character command allows a literal character (such as Control C) to be inserted into the file. This is useful for inserting control codes that may be needed by printers or other devices. Pressing Ctrl+I tells UltraEdit that the next character is to be inserted directly into the file without any translation.
Use this command to insert your custom templates.
You may want to see our power tip on custom text templates in UltraEdit.
The Insert Color feature allows you to select a color value and insert it into a document.
You can also click the eye dropper icon and sample colors from anywhere on the screen!
The color value is shown in one of the three specified formats:
- Decimal – This is the decimal value for the color value in RGB (Red,Green,Blue).
- Hexadecimal – This is the hexadecimal value for the color value in RGB (Red,Green,Blue).
- HTML – This is the format required for display in an HTML document. The # is added to the value.
When the dialog is first displayed, the color value will default to the selected color (if there is a value selected) in the active file. UltraEdit will try and determine the format of this also based on the selection.
When the user clicks on OK, the Color Value shown will be inserted into the document, replacing the current selection if a selection is made.