home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hall of Fame
/
HallofFameCDROM.cdr
/
wp4
/
wf200-c.lzh
/
WF.007
< prev
next >
Wrap
Text File
|
1989-12-22
|
6KB
|
160 lines
.f3 - # - Chapter 7 - Search & Replace
.rm70
.mt5
.mb5
.pl66
.tc
.tc 7. FINDING AND REPLACING TEXT .........................#
7. FINDING AND REPLACING TEXT
.Tc Search .............................................#
Search
First, you must tell Word Fugue that you wish to search for text. You can do
this in any of 3 ways.
(i) Press function key F5
or (ii) Activate the pull down menu. Press S for Search,
followed by F for Find
or (iii) Press CTRL Q F (this is a WordStar command)
A pop up window will appear on the screen with the words Search
for
Type in the letters you wish to find and press return. Word
Fugue will prompt you for options for the command Options:
The options available are:
U Upper case - treat the string to search for and the file
as if they are all in upper case. Thus and will match
and AND anD AnD aNd . If you do not enter this
option then the case of the letters will be important.
This means that and will only match and
B Backward - This tells Word Fugue to search backwards from the
cursor position. If you do not specify this, then Word Fugue
will search forward.
W Word only - This tells Word Fugue to search for whole words
only, and not to match bits of words
Thus and will match and only.
If you do not specify this, and will match with
band sand andalusium and so on.
L Locally - this means that Wordfugue will search the marked
block as long as it is visible.
n Where n is an integer. Search for the nth occurrence of the
string.
G Global search. For finds this means always start from the top
of the file.
Press enter when you have entered the options, and Word Fugue will
search for the letters.
The cursor stops on the first occurrence of them. Press CTRL L to
find the next occurrence (unless you used the G option). Keep
pressing CTRL L once for each occurrence.
When Word Fugue stops finding the text, you will be informed:
Not found - Press ESC
.cp5
.Tc Replacing text .....................................#
Replacing text
First, you must tell Word Fugue that you wish to replace text. You can do
this in any of 3 ways.
(i) Press function key F6
or (ii) Activate the pull down menu. Press S for Search,
followed by R for Replace
or (iii) Press CTRL Q A (this is a WordStar command)
A pop up window will appear on the screen with the word Search for
Type in the letters and press return. Word Fugue will prompt with
Replace. Type the letters you wish the to use for replacement.
Word Fugue will then prompt you with Options
The options available are the same as for FIND above, with the
following additions:
G Global search - go to the top of the file, and search for all
occurrences, and replace them. You do not need to press CTRL L
for the next occurrence. If you also specified the B option,
then Word Fugue will go to the end of the file and search
backwards.
N Do not ask. The default when replacing is to ask you whether
you wish to replace this occurrence.
If you specify N option, then Word Fugue will not ask you, but
will replace every occurrence.
If the N option is not specified, a prompt will occur each
time the search pattern is found. This prompt will provide the
following options:
Y - replace this text and continue searching.
N - do Not replace, but continue searching.
A - replace this text and replace All others without prompting.
Q - do not replace, and Quit searching.
Press enter when you have typed in any options. (You do not
need to type in options). The cursor jumps to the first
occurrence of and replaces it with the new letters.
TIP - when doing a Global replace with the N option, Word Fugue
still shows you each occurrence as it replaces it. This takes
time to update the screen each time. If you wish to speed it
up, and do not want to see each occurrence as it is changed,
press Page Up or Page Down as Word Fugue is working. The
screen will stop updating until Word Fugue has finished the
search and replace operation.
.cp5
.Tc Find And Apply Macro ...............................#
Find And Apply Macro
First, you must tell Word Fugue that you wish to replace text. You can do
this in either of 2 ways.
(i) Activate the pull down menu. Press S for Search,
followed by U for Use Macro
or (ii) Press CTRL Q M
A pop up window will appear on the screen with the word Search for
Type in the letters and press return. Word Fugue will prompt with
a menu of available macros. Select the macro you want to use with
the cursor keys and press Enter. Remember that the cursor is
positioned at the end of the search string.
Word Fugue will then prompt you with Options
The options available are the same as for REPLACE above.
Press enter when you have typed in any options. (You do not
need to type in options). The cursor jumps to the first
occurrence of and applies the macro.
You can also nest this command within other macros, leading to
arbritrarily complex commands.
.tc Find Matching >}]) or end ..........................#
Find Matching >}]) or end
This command makes life easier for programmers by allowing you to see
if your brackets are matched. It also allows you to match begin end
pairs, but be aware that some language constructs have an end but no
explicit begin. An example of this is Pascal's Case statement.
Place the cursor on ({[< and press the command Ctrl K [. The cursor
will be positioned on the matching >]}) or you will receive an error
message if none can be found. Also, if you place the cursor on the B
of begin and Word Fugue will position the cursor on the matching end
for you.