Application Suite: Edit
Finding and replacing text
Edit has a very sophisticated find and replace function to enable you to find words or characters in a document and replace them by others if you wish.
To find a particular word or character (the target string) position the caret at the start of the file before choosing Edit->Find or pressing F4. The window shown will then appear. Target string may be any combination of words, numbers, letters, spaces or other non-printing characters.
Searching for a string
Choose Edit->Find or press F4. Type in the string you wish to find and click on Go. If you've already tried to find the string once and want to search for it again, click on Previous.
If the string is not located, the message Not found is displayed. If it is found, the Text found dialogue box will appear.
Click on Continue in this dialogue to look for the next instance of the string.
Other Find and Replace options
Making searches case sensitive
By default, Find text makes no distinction between upper and lower case. For example, It will find HELLO, hello, or HeLLo. If you click on Case sensitive , however, it will find only those instances which match exactly in case.
Using magic characters
You can also use find and replace special, or 'magic' characters. Click on Magic characters or press F5 in the Find dialogue box and a list of them will be displayed in the lower half of the dialogue box.
Magic characters start with a '\' character, and you type them into the Find and Replace with boxes exactly as shown.
Functions and their magic characters:
Using wildcarded expressions
There is also a facility for specifying wildcarded expressions in search strings. Click on Wildcarded expression s in the Find dialogue box to display the ones you can use.
Click on the wildcard character you wish to enter and it is copied into the text box at the caret.
The wildcard characters operate as follows.
The full power of the wildcard facility can be illustrated by a few examples:
Reading in text from another file
If you want to add all the text from another file into the current file:
The entire contents of the source file is then copied into the destination file, starting at the caret position. The caret appears at the end of the text you have inserted.
There are two ways to copy just a part of the text from one file into another:
Formatting describes how the text in Edit is arranged on the page.
Before you can use these features, click in the Edit window to get the input focus (the title bar will turn yellow).
To set a margin choose Display->Margin. Type in a value and press Return. You can have one lefthand margin set at a time in Edit. The margin is set in pixels.
To set the line spacing choose Display->Line spacing. Type in a value and press Return. Line spacing is set in pixels, and can be a positive or negative value.
To reformat all lines in a paragraph to a given length place the cursor anywhere in the paragraph, choose Edit->Format text, type in a value for width and press Return. Useful for tidying up after editing. Width is measured in characters per line. This value is also used by the Wordwrap option.
To make your text fit the size of the window choose Display->Window wrap. Revert to default by choosing the option again.
To prevent words being split over lines as you type choose Misc->Wordwrap. A newline character is inserted at the end of a line and the next whole word is wrapped onto the next line. Line length is set in the Edit->Format text option.
To convert linefeeds to carriage returns (and vice-versa) choose Edit->CRLF. Choose again to undo. Carriage returns appear as [0D] in the text.
You can indent a selected block of text in Edit. The indent is defined in character spaces. You can indent using just spaces, or add a text prefix to the beginning of each line of a block.
To indent a selected block of text, choose Edit->Select->Indent.
You can then type in one of three different types of indent:
Tabs in Edit are designed to work with fixed-pitch fonts, such as the System font. If you use tabs in Edit with proportionally-spaced fonts (such as Trinity, for example), tables will not line up properly.
Laying out tables with irregular columns
Laying out tables with regular columns
Converting tab characters to column tabs
The text will be reformatted so that each tab character is replaced by eight spaces.
Changing the display font
You can display Edit files using any available desktop font.
To change the screen font displayed by Edit choose from the Display->Font submenus. Tabs and columns will not look right in proportional fonts.
To change the screen font size you should choose the size in points from the Display->Font sizemenu. You can specify a different size in the bottom of the Font size menu.
To change the screen font height choose Display->Font height then the size you want (in points). The current width will not be changed (you should use Display->Font size for this).
To change the text colour choose a colour from the Display->Foreground submenu. To change the background colour choose a colour from the Display->Background submenu.
To Invert text and background colours choose Display->Invert . Choosing this option again toggles back.
Note: Font information is not saved with the Edit file, so does not print. You can only have one style of text at a time in each Edit document.
Exporting (saving) text
The Save menu lets you save a complete file or part of a file.
To save a new file: Press MENU over the Edit file and drag the icon in the Save->Save as box to the destination directory (changing the default name TextFile if necessary). You can also press F3 to display the Save as box.
To save a file that's already been saved: Press F3 followed by Return .
To save part of a text file Select the text you want to save. Press MENU, drag and drop the Selection->Save->Save as icon. You can use this method to export text to another Edit file, or another application (e.g. Draw later).
Printing Edit files
There are several ways of printing an Edit file. To use them, you first need to load the Printers application.
To print an open Edit file choose Misc->Print. You can also press the Print key, or drag the Save->Save as icon onto the printer's icon bar icon.
To print a selection you should choose Select->Print. You can also drag the Select->Save as icon onto the printer's icon bar icon.
To print an Edit file not currently open drag the file's icon to the printer's icon bar icon. You can also do this if the file is loaded. Unsaved changes will not print.
Note: Edit files are always printed out using the printer's default font. This overrides any screen font chosen from the Edit->Display->Font menu.
This documentation is copyright 3QD Developments Ltd 2013 and may not be reproduced or published in any form without the copyright holder's permission. RISC OS is subject to continuous development and improvement as such all information is provided by 3QD Developments Ltd in good faith and is believed to be correct at the time of publication E&OE. 3QD Developments Ltd cannot accept any liability for any loss or damage arising from the use of any information provided as part of the RISC OS Documentation.
HTML document version r23142 (3rd November 2015)