Roger King
In part two of this series, we covered the first three options on StrongED's main menu. We will now look at StrongED's Edit menu.
The edit menu
The first choice is the insert function. If this item is ticked, StrongED is in Insert mode. If unticked, StrongED will be in Overwrite mode. This option can also be toggled on and off by clicking on the Insert/Overwr icon on StrongED's infobar.
The After Block option allows you to choose the position of StrongED's cursor after a block of text has been moved or copied. If this option is ticked then the cursor will be placed on the right-hand side of the block of text that has been copied or moved. If unticked, the cursor will be placed at the beginning of the copied or moved block.
The Tabkey option allows you to choose what happens when <tab> is pressed. If Truetab is chosen, StrongED will insert either a four or eight character tab according to how the tab character has been set up from the Mode Choices.Display pane. It is better to use an eight character tab to make StrongED files compatible with the Edit application. Any StrongED document containing four character tabs will, if loaded into Edit, be expanded into eight character tabs.
If the Nearest option is chosen from the Tabkey choice then StrongED will insert enough spaces to position the cursor under/over the start of a word on the line above/below.
The final Tabkey choice offers a writable icon where a number can be entered to insert enough spaces to move the cursor to the next column divisible by that number. The Tabkey option on the Edit menu is also available on StrongED's infobar.
The interactive search option
Clicking this option on StrongED's Edit menu, or using the key shortcut <f4>, will produce on screen the Interactive Search pane. This pane contains a writable icon where search data can be entered.
As an introduction to interactive searching try this experiment. Enter into a StrongED window the following words: Strong, StrongED, Chapter 1, Chapter 2. Enter a few <return> codes between each word. Once you have entered these few words, return the cursor to the start of the file by using the <page up> key or <ctrl-cursor up>. It is important to return the cursor to the start of the document as the Interactive Search feature will only take place from the current position of the cursor.
Now call up the Interactive Search option and click on the Case icon (or use <ctrl-C>) and enter into the writable icon the word 'Strong'. As you start typing the character S, StrongED's cursor will immediately go to the first occurrence of a capital S in the document. When the rest of the word has been entered, the first occurrence of the word Strong will be highlighted in the text. You can now use the Next icon or <cursor down> to search for the next occurrence, if any, of the word Strong. As you have entered the word StrongED into the document, the next occurrence will highlight the Strong of StrongED.
Now return the cursor to the start of the document and enter into the Interactive Search icon the word StrongED. As there is only one occurrence of this word in the document, StrongED's cursor will immediately highlight this word.
Use the above techniques to find the occurrences of the words Chapter 1 and Chapter 2.
You have now entered into StrongED's Interactive Search icon four words: Strong, StrongED, Chapter 1 and Chapter 2.
StrongED has memorised these four words, and the Interactive Search option can be used again to search for these words at any future time in a current session of using StrongED. Call up StrongED's Interactive Search icon and click on the Old icon, or alternatively use <page up> and <page down>. You can now search for previously entered words by using these keys. As each word is displayed in the Search icon, the cursor will be moved to the first occurrence of that word in the document.
The Next icon will find the next occurrence of that word in the text. Clicking on the Prev icon will take the cursor back to the previous location of that particular word. The options offered by the Next and Prev icons can be simulated by pressing <cursor up> and <cursor down>.
This search technique can be very useful in taking the cursor to a particular place in a document without the need to scroll through the document looking for such an occurrence. I mainly use this technique to go to paragraph headings in a large document.
The replace option
Clicking this option on StrongED's Edit menu, or using the key shortcut <shift-f4>, will produce on screen the Search/Replace pane is as shown:
Apart from the Search icon, as used on the Interactive Search pane, this pane also has an icon into which a replace string can be entered. It is important to return the cursor to the start of a document before calling up the Search/Replace pane. If this is not done then the Search/Replace option will only take effect from the current cursor position.
The Interactive Search and Search/Replace panes will also allow the word at StrongED's cursor to be entered into the search writable icons by means of the key shortcut <ctrl-W>.
You will see on the Search/Replace pane seven icons which will now be discussed.
The first icon, Advanced, relates to searching a StrongED document for special characters and codes. The Advanced option will be discussed in detail in a future article as it differs quite considerably from the techniques used by Acorn's Edit application.
The second option is the Line icon. When this icon is clicked upon, StrongED will start its search/replace operation at the beginning of lines only. The key shortcut to toggle this function on and off is <ctrl-L>.
The Case icon, if selected, will make sure that StrongED's search/replace operation only takes place if words have exactly the same upper and lower case letters as the search string.
The Old icon functions in similar manner to that on the Interactive Search pane and the same key shortcuts apply.
The icon next to 'Search:' can be clicked on to select the search/replace area in a document. There are three options: All, Text and Block. This last item will not be available if there is no marked text within the document. Choosing the All option will perform a search/replace in both text and a marked text block if present. The Text option will only perform a search/replace option on unmarked text. The final option Block will only perform a search/replace on a marked block of text.
The next icon, Count, if clicked upon, will inform of the occurrences in a document of a word entered into the Search writable icon. If StrongED can find the word you have entered, an icon will appear on screen showing you the total count:
The final icon on the Search/Replace pane is the Go option. Once search and replace strings have been entered into their respective writable icons, clicking upon this icon, or alternatively pressing <return>, will start the search/replace procedure. As soon as this option has been chosen you will see either one or two icons appear on screen.
The first is self-explanatory:
But remember that this may be due to the Case icon being set and the string you entered not being exactly the same case as the word you are trying to find.
If StrongED should find the search string in a document, the word will be highlighted and you will see the following icon:
The Next icon, if clicked upon, will jump to the next occurrence of the word in the document without a replace option taking place (key shortcut <ctrl-N>). Clicking on the Replace icon will replace the highlighted word with that which was entered into the Replace writable icon and then move on to the next highlighted word (key shortcut <ctrl-R>). Finally, clicking on the Replace All icon will perform a global replace on all found words in the document (key shortcut <ctrl-A>).
When the last occurrence of the search string has been changed, StrongED will produce the "String not Found" message icon shown above.
Alongside these three options are two more icons: Undo and Redo. If you have performed a replace option and then realise you have made an error, then clicking on the Undo icon will restore the replaced word to what it was originally. You may also use the Redo icon in a similar manner. The key shortcut for Undo is <f8>, and for Redo is <ctrl-f8>.
The ListOfFound option
The ListOfFound function is another powerful search facility that StrongED provides. The use of this function is very similar to previous search methods described in this article.
Text can be entered into the writable icon or, as with previous search methods, the word at StrongED's cursor can be entered with the <ctrl-W> shortcut. The icon to the right of 'Display:' can be clicked upon to offer the following options: Whole, From and After. If Whole is selected, the list of found option will use the entire text. 'From' means search from the cursor and 'After' means search from after the cursor.
The previous search and search/replace procedures have only operated upon the current text document that you are working on. The List of Found procedure will function with any other of StrongED's documents loaded into memory at the same time providing that the All option is chosen.
The icon to the right of 'Search:' can be clicked upon to offer the following options: All, Text and Block (if marked). If All is selected, the list of found option will operate on all texts held in memory at the same time. The Text option means search only the current document and Block means search in the marked block of text.
Try this experiment. Open up a blank StrongED window and type into it the following string:
Customer No. 1234
Now save this file to disc with the filename Letter1.
Create another StrongED document and enter into the string: Customer 5678. Save this file to disc with the filename Letter2.
Now load both documents back into memory, if not still present. Click <select> in either document Letter1 or Letter2, and call up the ListOfFound option from StrongED's Edit menu or, alternatively, use the key shortcut <f2>.
Now enter the word Customer into the writable icon and make sure that the All option is selected. If the case of the search string is important, select this option as well. Now click on OK, or press <return>. The List of Found pane will be displayed as:
This pane shows that two matches for the word Customer have been found. The two highlighted lines in this pane inform you of the filenames in which StrongED's List of Found option has found a match for Customer. If you now click <select> on the line Customer No. 1234 in this pane, StrongED will bring to the front the document containing this string. If you now click <select> on Customer 5678, this document will be brought to the front instead.
If you have a screen cluttered with StrongED documents, this function can be invaluable in searching for certain words and bringing that document into view.
The List of Found function, as with other search and search/replace procedures, will store in memory all strings entered in the current session of using StrongED. Use the Old icon or <page up> and <page down> to cycle through the list of previously entered search words.
Goto line
This function from StrongED's Edit menu, or the key shortcut <f5>, will bring up the Goto pane shown in the drawing below:
Displayed within this pane is the current position of the cursor and the last line number of the file. Entering a number into the writable icon will take the cursor to that line.
Goto block
Selecting this function, or the key shortcut <shift-f5>, will take the cursor to a marked block, if present within a document.
Undo and redo
These two functions allow you to make changes to a document and reverse the action if necessary. StrongED does not hold in memory every alteration that you make, so only a few alterations can be undone or redone.
Change \n
StrongED can be used to create and edit varied files and this facility makes coping with different control codes used to indicate a new line very easy. The function is also available on the infobar.
Unwrap
The last option on StrongED's Edit menu is the unwrap function. This is a facility which inserts a newline character into single text lines which have been automatically wrapped down onto the next line.
To see its effect, create or import a file which has a number of lines which have been wrapped. Go to the File info option on the Misc menu. The number of text lines and the number of wrapped lines should be different. Apply the unwrap option and then look at the File info pane once more. The two types of line should now read the same.