The Search menu contains a number of commands for finding and replacing text.
Search → Find... and Search → Replace... present dialogs for entering text for searching and replacing. These dialogs also allow you to choose whether you want the search to be case sensitive, or whether to use pattern matching syntax (regular expressions). Searches begin at the current text insertion position.
Search → Find Again and Search → Replace Again repeat the last find or replace command without prompting for search strings. To selectively replace text, use the two commands in combination: Search → Find Again, then Search → Replace Again if the highlighted string should be replaced, or Search → Find Again again to go to the next string.
Search → Find Selection 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-ng window and choose Search → Find Selection.
Search → Find Incremental, which opens the interactive search bar, is yet another variation on searching, where every character typed triggers a new search. After you've completed the search string, the next occurrence in the buffer is found by hitting Return, or by clicking on the icon to the left (...). Holding Shift down finds the previous occurrences. A middle click on the clear button copies the content of any existing selection into the search text widget and triggers a new search.
Searching Backwards
Holding down Shift 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 Search → Find Again and Search → Replace Again don't continue in the same direction as the original search (for experienced users, consistency of the direction implied by Shift is more important).
Selective Replacement
To replace only some occurrences of a string within a file, choose
Search → Replace..., 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 Search → Replace Again (Ctrl + T) to
replace it, or Search → Find Again (Ctrl + G) 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 Search → Replace...,
type the string to search for and the string to substitute, and
press the Selection
button in the dialog. Note that selecting text
inside the search or replace dialog will unselect the text in the window.
Replacement in Multiple Documents
You can do the same replacement in more than one document at the same
time. To do that, enter the search and replacement string in the
replacement dialog as usual, then press the Multiple Documents
button.
NEdit-ng will open another dialog where you can pick which open
documents the replacement should take place in. Then press Replace
in
this dialog to do the replacement. All attributes (Regular Expression,
Case Sensitive, etc.) are used as selected in the main dialog.