RED Reference: Misc. Functions

MAIN INDEX FUNCTION OVERVIEW

EDIT, MOVE&SCROLL, FILE CUSTOMISATION, HELP MISC.


undo

Keys: Alt-z, F9
Menu: Edit

Undo the last editing command. Undo can be called repeatedly to undo several previous changes. The number of possible undos is currently 40. Undos themselves are recorded on the undo-stack and can be undone (redo). To redo, use a non-undo function (e.g. move cursor), then undo again.


find

Key: Alt-f
Menu: Tools

Find a word or string in the buffer. Starts a dialogue to specify some options. The elements of the find dialogue are:
The find string
Enter here the string to be searched for.
"Insert" buttons
Line Break: inserts a line break into the search string. By doing this, strings can be found that contain a line break or are either at the beginning or the end of a line. E.g. by searching for "abcline break", only strings "abc" at the end of a line will be found.
Tab: inserts a Tab character into the search string.
Case sensitive option
If checked, this option causes Red to search for the search string with exactly the letter case as you have specified it. If not checked (the default), Red finds the search string in any combination of upper and lower case characters.
Match whole word option
If checked, only whole words are found.
Find Forward button
Clicking this button closes the dialogue box and searches for the specified string from the cursor position forward. This is the default button (a press of the Return key acts as a click in this button).
Find Backward button
Closes the dialogue box and searches for the specified string from the cursor position backward.
Help button
Display a help text for the dialogue.
Close button
Closes the dialogue without performing a search. The dialogue must be closed before further editong in the main window can be done.


find-backward

Key: Shift-Alt-f

Same as find, but the default button is Find Backward. So typing the find string and "Return" will search backwards.


find-next

Key: Alt-g
Menu: Tools

Finds the string currently selected or, if nothing is selected, the same pattern as in the last find operation. Uses the same parameters (direction, case sensitivity, whole word option) as the last find operation. Stops at the end of the buffer. If called again, wraps around to the beginning (end) of the buffer.


find-next-reverse

Key: Shift-Alt-g

Like find-next, but reverse the direction of the search.


quick-find

Key: Ctrl-f

Quick find function. Uses the info area to enter the search string. The search is executed while the text is typed. No dialog is opened. Quick-find always searches forward, ignoring character case. Calling quick-find again after the end of the buffer is reached causes the search to continue at the beginning of the buffer.

A more detailed description of how to use quick-find is in the Quick Find section of the tutorial.


replace

Key: Alt-r
Menu: Tools

Replace string in the buffer with another one. Starts a dialogue to specify some options. The dialogue elements are:

Find string
Type the string to be replaced here.
Replace string
Type the string to use as replacement here.
Insert Tab
Insert a Tab character into the find or replace string. This can not be done with the Tab key, since that key has a special function in Motif dialogues.
Insert Linebreak
Insert a line break into the find or replace string. This can not be done with the Return key, since that key has a special function in Motif dialogues. You can use this for searching for strings at the beginning or the end of a line. For example, the search string "dog<linebreak>" finds all occurrences of the word "dog" at the end of a line. A line break in the replace string inserts line breaks into the text. E.g. a find string "<linebreak>" and a replace string "<linebreak><linebreak>" will insert an empty line between each line in the text (by replacing each line break with two line breaks).
Case sensitive option
If checked, this option causes Red to search for the search string with exactly the letter case as you have specified it. If not checked (the default), Red finds the search string in any combination of upper and lower case characters.
Match whole word option
If checked, only whole words are found.
Search backwards option
If checked, the search is performed from the cursor position backwards. Otherwise it is done from the cursor position forward.
Find Next
Start the find operation from the cursor position in the specified direction.
Replace
Replace the string found with the replace string and go on searching for the next occurrence of the find string. This can only be done after the first find string has been found. Usually you click "Find Next" first, then you decide whether to use "Find Next" again (do not replace this one) or "Replace" (replace this one and find the nect one).
Replace All
Replace all occurrences of the find string with the replace string. This function works only from the cursor position to the end or beginning of the text (depending on the search direction), so it can be used to do a replace in part of the text by placing the cursor prior to calling this function.
Help
Display a help dialogue for the replace dialogue.
Close
Close this dialogue. The dialogue must be closed before further editing can take place in the text window.


set-mark

Key: Ctrl-space, F7

Set the mark at the current cursor position. The mark is used for two things: It remembers a position and can be used to quickly move the cursor back to that position (see swap-cursor-mark). It is also used in all functions applying to the region: the region is the area between the mark and the cursor.

The mark is automatically set by some movement functions (like beginning-of-text).


goto-line

Key: F5
Menu: Tools

Set cursor to line number. The line number is prompted for after starting this command.


show-line-number

Key: F6
Menu: Tools

Display the current line number in the information area. This function displays the line number only temporarily. A permanent line number display can be enabled through the preferences dialogue (see preferences).


define-macro

Record the following keq sequence until the next call to end-macro and store it as a macro. (NOT YET IMPLEMENTED!)


end-macro

End the current macro recording, ask for a key, and bind execution of the macro to that key. (Must be currently defining a macro. (NOT YET IMPLEMENTED!)


run-macro

(NOT YET IMPLEMENTED!)


redisplay

Key: Alt-l

Center cursor in the window and redisplay the screen.


blue-new-routine

Key: Ctrl-r

Insert a skeleton for a Blue routine into the text. (This is only useful when writing programs in the Blue programming language.)


blue-expand

Key: Ctrl-e

Expand a Blue control structure. If the cursor is in or behind one of the words "if", "loop" or "case", a skeleton for the respective control structure is inserted. The function next-flag may be used to move the cursor to flagged positions in the structure. (This is only useful when writing programs in the Blue programming language.)


EDIT, MOVE&SCROLL, FILE CUSTOMISATION, HELP MISC.

MAIN INDEX FUNCTION OVERVIEW