The
menu contains
a number of commands for finding and replacing text.
The commands present dialogs for
entering text for searching and replacing. These dialogs
also allow you to choose whether you want the search
to be sensitive to upper and lower case, or whether
to use the standard Unix pattern matching characters
(regular expressions). Searches begin at the current
text insertion position.
and
repeat the last find or replace command without prompting
for search strings. To selectively replace text, use
the two commands in combination: , then if the highlighted string should be replaced,
or
again to go to the next string.
searches for the text contained in the current primary
selection (see Selecting
Text ). The selected text does not have to be
in the current editor window, it may even be in another
program. For example, if the word dog appears somewhere
in a window on your screen, and you want to find it
in the file you are editing, select the word dog by
dragging the mouse across it, switch to your NEdit
window and choose n from the
menu.
is yet another variation on searching, where every
character typed triggers a new search. Incremental
searching is generally the quickest way to find something
in a file, because it gives you the immediate feedback
of seeing how your search is progressing, so you never
need to type more than the minimally sufficient search
string to reach your target.
Searching Backwards
Holding down the shift key
while choosing any of the search or replace commands
from the menu (or using the keyboard shortcut), will
search in the reverse direction. Users who have set
the search direction using the buttons in the search
dialog, may find it a bit confusing that and don't continue in the same direction
as the original search (for experienced users, consistency
of the direction implied by the shift key
is more important).
Selective Replacement
To replace only some occurrences of
a string within a file, choose
from the
menu, enter the string to search for and the string
to substitute, and finish by pressing the Find
button. When the first occurrence is highlighted,
use either to replace it, or to move to the next occurrence without
replacing it, and continue in such a manner through
all occurrences of interest.
To replace all occurrences of a string
within some range of text, select the range (see Selecting
Text ), choose
from the
menu, type the string to search for and the string
to substitute, and press the "R. in Selection"
button in the dialog. Note that selecting text in
the .
dialog will unselect the text in the window.
|