This site is designed to take advantage of CSS. If you are seeing this, CSS must not be available or enabled in your browser. Everything should still work, but won't be as pretty. :)
invers Software
 
HomeOpen Search & replace windowOpen Search & replace window(Jokers)
  Eddie > Block functions/Tools > Open Search & replace window Index

Search & replace of simple text

Let's start with an easy task: Searching and replacing of simple portions of text, where simple does not refer to the length of the text portion but to the absence of placeholders (jokers). It makes no difference whether the search is for a single letter, a word, or one or more complete sentences; the amount of text on its own does not influence the operation or behaviour of the individual functions.

The following applications will be explained:

Searching and marking

Initially all special switches and options should be turned off, as they are not required at this stage. This concerns the labelled checkboxes in the centre section as well as the Multi button. Now we can start: Enter the text that Eddie is to search for in the field below the SEARCH FOR: bar and then click on the single magnifier icon (Search global). This already shows the first application: Eddie hunts through the complete main text for the presence of the search-text. The number of the found occurences will then be displayed in the status line in the Search & replace window:

Now activate the Mark text checkbox and repeat the process. In the full version, all matching parts found will be shown marked as blocks afterwards (in Eddie lite only the last match found is marked as a block). Any existing markings will be cleared during this.

Find control codes

As already indicated, the search-text may also contain control codes. Eddie will then find all text parts that contain exactly that control code. This means that if the text contains the Headings style code, for instance, Eddie will only find Headings styles, though not Body text, underlined styles. With the aid of the joker, described further below, it is possible to search for control codes independently of their contents (in our example any kind of style). With frame anchors, instead of the contents (i.e. the actual frame) only its name will be used for comparisons.

Replace text globally

In order to replace all occurrences of the text contained in the SEARCH FOR: field with a different contents at one go, just enter the replacement text in the input field below the bar labelled REPLACE WITH: and start the action by clicking on the Search & replace global icon (with four Xs). Here too you have the choice of adding block marks to the found and replaced parts of the text (only the last replacement in Eddie lite).

Both functions – Search global as well as Search & replace global – may also be applied to portions of the text. To do this, mark the desired portion of the main text as a block (by dragging the mouse over it with the left button held down) and switch on the In blocks only checkbox. All passages not marked as a block will be unaffected by the action in that case.

Single search/replace

A further variant of search/replace is controlled by the next four icons (with up/down arrowheads), namely the finding or replacing of only one text passage in each case. The reference point here is the position of the cursor in the text window. Eddie will look for the next occurrence of the entered search-text from this position onwards, though the text exactly at the cursor position will not be checked. The search direction will be determined by the use of the corresponding icon: Towards the start of the text (Find previous text part upward arrowhead) or towards the end of the text (Find next text part downwards arrowhead). With each click on the icon Eddie searches for the following matching text portion and places the cursor there. In addition a built-in position indicator, a small collapsing rectangle, helps you to localise the new cursor position quickly and easily (this indicator can also be called up manually at any time by simultaneously pressing [Control]+[Shift]+[Alternate] keys, by the way).

The single. i.e. optional replacement of text parts is realised in Eddie with two further icons (one for each search direction), whose help-text runs Replace, then find previous/next text part. That already describes what this function does: The text portion at the cursor position will be replaced, and after that the editor will look for the next occurrence of the search-text in the specified direction and move the cursor to the corresponding position. At first look this function may seem a bit peculiar. In conjunction with the single search (without replacement), however, this presents a convenient method to target just some of the found text passages for replacement. To do this you only have to position the cursor at the start of the region to be searched and start the process with Find previous/next text part. Eddie will now jump to the first found passage. Now you have the choice: Do you want to replace the text? If so, click on the Replace, then find previous/next text part icon, whereby the editor after replacement will continue immediately to the next passage that matches the search-text. If you do not wish to replace this particular text part, a click on the Search function leaves the found text untouched and jumps immediately to the next occurrence. This procedure can be repeated as often as desired.

We recommend, incidentally, that you allocate keyboard shortcuts with the Calamus Macro recorder to the Search/Replace icons (for instance [Control]+[S] for Search and [Control]+[R] for Replace, then find next part). Single searches with optional replacement can then be performed quickly and easily with two key combinations.

Incidentally, Replace, then find... can also be used without first using the search function, by placing the cursor at the desired text position beforehand. Eddie will check in each case whether the search-text actually matches part of the main text, and if not shows an error message in the status line of the Search & replace dialog window.

A final remark: On principle, the Calamus text format is not suited to being searched through backwards. In such cases too Eddie has to work through the text forwards and memorize the last found match. Due to this, backwards searching is slowed down, so whenever possible you should always let the editor search forwards.


Copyright © invers Software (Home)
Last updated on June 24, 2015

HomeOpen Search & replace windowOpen Search & replace window(Jokers)